lkml.org 
[lkml]   [2013]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] aio: fix D-cache aliasing issues
On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote:
> On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote:
> > When a user page mapping is released via kunmap*() functions, the D-cache needs
> > to be flushed via flush_dcache_page() to avoid D-cache aliasing issues.
> >
> > This patch fixes aio on the parisc platform (and probably others).
>
> This should be flush_kernel_dcache_page(). flush_dcache_page() is for
> full coherency but for unmap, we know the page was coherent going in and
> may have been modified by the kernel, so only the kernel view needs to
> be sync'd. Technically, by the kernel API, the flush should be done
> *before* unmapping. This would have mattered on parisc until we did
> flush via tmpalias which means we no-longer care if the mapping for the
> flush exists or not because we always recreate it via the tmpalias
> pages.

On ARM, flush_kernel_dcache_page() actually assumes that the page is
mapped. It avoids double flushing of highmem pages by not flushing
in those cases where kunmap_atomic() already takes care of flushing.


- Simon


\
 
 \ /
  Last update: 2013-11-16 21:21    [W:0.069 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site