Re: fuse, get_user_pages, flush_anon_page, aliasing caches and all that again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Miklos Szeredi <[email protected]>
Date: Sun, 31 Dec 2006 10:10:35 +0100

> > Therefore, FUSE probably could have been fixed by judicious use
> > of copy_{to,from}_user_page() calls instead of adding this new
> > ad-hoc flush_anon_page() thing.
> 
> Probably, but I don't think either interface is perfect.
> copy_*_user_page() will double flush the user mapping
> (get_user_pages() already does a flush_dcache_page()).  Actually
> nothing except ptrace uses the copy_*_user_page() interface even
> though there are many uses of get_user_pages().
> 
> What I think get_user_pages() really needs is a single operation that
> 
>   - flushes the virtual address view
>   - flushes the kernel view
> 
> regardles whether the page is anonymous or file backed.

I guess part of the problem is that flush_dcache_page() could have
better defined semantics.

Sparc64 never notices this precisely because it can flush by physical
page and thus it can just do the flush on anonymous pages
synchronously very cheaply.

ARM probably avoids it because it would be very expensive since it
needs to flush by virtual address, so in the best case it would need
to walk the RMAP mapping list and hit every user mapping, then flush
again for the kernel side virtual address of the direct mapping to
that physical page too.

It is certainly the case that all of this stuff could be done in
a much cleaner manner.  Although it's really hard for me to get
excited by this and do the work since sparc64 already works :-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux