[fuse-devel] Re: [parisc-linux] [PATCH] Fixs to work on ARM and PARIC platforms.

Miklos Szeredi miklos at szeredi.hu
Mon Apr 3 07:21:22 MDT 2006


> > Otherwise sparc and ppc would have to check PageAnon() from both
> > flush_dcache_page() and flush_anon_page() and call a common function,
> > which seems to just complicate things without any gain.
> 
> I don't think what you propose is desirable or possible:
> flush_dcache_pages() is designed not to have to flush them (it can't
> actually because it can't find them properly)

I see now, that flush_anon_page() also gets the virtual address.

Pardon my ignorance, but I'm still not getting the whole picture.

Current (with your API updates) get_user_pages() does the following on
PARISC:

  flush_anon_page():

    - If page is anonymous, the the user address is flushed which was
      passed to get_user_pages().

  flush_dcache_page():
     - The kernel address is flushed regardless whether the page is
       anonymous or not

     - If the page is file backed, then all user addresses refering to
       the page are flushed

Why this discrepancy between anonymous and file backed pages?
Wounldn't it be enough for file backed pages too to flush only one
user address?

Added to the mix are copy_to/from_user_page() which already seem to do
the above, and are used in combination with get_user_pages() which
results in multiple redundant cache flushes.  Not too clean, is it?

Thanks,
Miklos



More information about the parisc-linux mailing list