public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] shmem missing cache flush
@ 2002-10-16 18:26 Matthew Wilcox
  2002-10-16 23:57 ` Hugh Dickins
  0 siblings, 1 reply; 21+ messages in thread
From: Matthew Wilcox @ 2002-10-16 18:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Hugh Dickins


Really, this should be a clear_user_page(), but we can't reasonable get
a user address all the way down to it, so let's just flush it instead.
Note that 2.4 needs an equivalent fix.

diff -urpNX build-tools/dontdiff linus-2.5/mm/shmem.c parisc-2.5/mm/shmem.c
--- linus-2.5/mm/shmem.c	Tue Oct  8 10:54:20 2002
+++ parisc-2.5/mm/shmem.c	Tue Oct  8 16:49:24 2002
@@ -848,6 +848,7 @@ repeat:
 		info->alloced++;
 		spin_unlock(&info->lock);
 		clear_highpage(page);
+		flush_dcache_page(page);
 		SetPageUptodate(page);
 	}
 

-- 
Revolutions do not require corporate support.

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: [PATCH] shmem missing cache flush
@ 2002-10-28 16:50 Manfred Spraul
  0 siblings, 0 replies; 21+ messages in thread
From: Manfred Spraul @ 2002-10-28 16:50 UTC (permalink / raw)
  To: Matthew Wilcox, David S. Miller, linux-kernel, Russell King,
	Alan Cox

Is it permitted to call flush_dcache_page() on pages that are not in the 
page cache?
The documentation is ambiguous, it only mentions how archs can handle 
dcache aliases for page cache users.

What about the user space accesses that kmap user space pages directly, 
without copy_*_user?

For example:
- ptrace
- disk transfers that end up calling __bio_kmap() - RAID-5, ide error 
handling.
    Could be from irq context!
- hole handling for O_DIRECT file access.

In all 3 cases, the target could be outside of the page cache.

--
    Manfred


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-10-29 21:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-16 18:26 [PATCH] shmem missing cache flush Matthew Wilcox
2002-10-16 23:57 ` Hugh Dickins
2002-10-16 23:58   ` David S. Miller
2002-10-17  0:19     ` Russell King
2002-10-17  0:16       ` David S. Miller
2002-10-21 15:04         ` Alan Cox
2002-10-21 15:21           ` David S. Miller
2002-10-21 16:12             ` Alan Cox
2002-10-28 14:10               ` David S. Miller
2002-10-28 14:32                 ` Matthew Wilcox
2002-10-28 14:26                   ` David S. Miller
2002-10-28 16:36                     ` Matthew Wilcox
2002-10-28 16:55                       ` David S. Miller
2002-10-28 17:06                         ` Matthew Wilcox
2002-10-28 16:58                           ` David S. Miller
2002-10-29 21:52                             ` Matthew Wilcox
2002-10-28 17:08                       ` Alan Cox
2002-10-28 16:52                         ` Matthew Wilcox
2002-10-28 14:35                 ` Hugh Dickins
2002-10-28 14:26                   ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2002-10-28 16:50 Manfred Spraul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox