[lkml]   [2005]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] [PATCH] cache pollution aware __copy_from_user_ll()
On Mon, 2005-08-15 at 17:44 +0900, Hiro Yoshioka wrote:
> Hi,
> I appreciate your suggestion.
> On 8/15/05, Arjan van de Ven <> wrote:
> >
> > > Anyway we could not find the cache aware version of __copy_from_user_ll
> > > has a big regression yet.
> >
> >
> > that is because you spread the cache misses out from one place to all
> > over the place, so that no one single point sticks out anymore.
> >
> > Do you agree that your copy is less optimal for the case where the
> > kernel will (almost) immediately use the data?
> Yes, I do.
> My server has 8KB of L1 cache. (512KB of L2/2MB of L3)
> If you move more than 4KB of data using by __copy_from_user_ll(), the
> data will be spilled over L1 cache but in L2 (or L3)

L2 access time isn't too bad. your code evicts the data even from L2 and
L3 though (even if it was in there before)..

> When you move huge data (> 1MB), even L3 cache will not help you.
> (This is known as a cache pollution.)

> copy_from_user_nocache() is fine.
> But I don't know where I can use it. (I'm not so
> familiar with the linux kernel file system yet.)

I suspect the few cases where it will make the most difference will be
in the VFS for the write() system call, and the AIO variants thereof.

generic_file_buffered_write() will be a good candidate to try first...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-15 10:57    [W:0.062 / U:8.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site