lkml.org 
[lkml]   [2003]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] cache flush bug in mm/filemap.c (all kernels >= 2.5.30(at least))
Hi,

On Wed, 28 May 2003, David S. Miller wrote:

> DMA-mapping.txt defines very precisely when flush_dcache_page() is
> invoked, and that is it's only definition. I purposely DO NOT say
> that "this is for reads" or "this is for handling virtual aliasing
> in L1 caches", I simply define where this macro is invoked and
> that is it.
>
> Specifically, flush_dcache_page() is called any time the kernel makes
> cpu stores into a page cache page that might be mapped into a user's
> address space.

cachetlb.txt also says "_OR_ the kernel is about to read from a page cache
page..." and it's used like this in mm/filemap.c. I think it would be
better to move this into a separate function, e.g. like this:

flush_user_dcache_page(): If the page is mapped writable into user space,
flush the dirty data from the user D-cache, so it becomes visible from the
kernel.
flush_kernel_dcache_page(): The page was written from kernel space and the
data has to become visible in user space, so flush the data into memory
and possibly invalidate data in the user D/I-cache. The flush can be
delayed if this page is currently not mapped.

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.081 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site