[lkml]   [2006]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [take21 0/4] kevent: Generic event handling mechanism.
On Tue, 07 Nov 2006 12:52:41 -0800 (PST)
David Miller <> wrote:

> From: Andrew Morton <>
> Date: Tue, 7 Nov 2006 11:34:00 -0800
> > What Evgeniy means here is that copy_to_user() is slower than memcpy() (on
> > his machine, with his kernel config, at least).
> >
> > Which is kinda weird and unexpected and is something which we should
> > investigate independently from this project. (Rather than simply going
> > and bypassing it!)
> It's straightforward to me. :-)
> If the kerne memcpy()'s, it uses those nice 4MB PTE mappings to
> the kernel pages. With copy_to_user() you run through tiny
> 4K or 8K PTE mappings which thrash the TLB.
> The TLB is therefore able to hold more of the accessed state at
> a time if you touch the pages on the kernel side.

Maybe. Evgeniy tends to favour teeny microbenchmarks. I'd also be
suspecting the considerable setup code in the x86 uaccess funtions. That
would show up in a tight loop doing large numbers of small copies.
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: 2006-11-07 22:41    [W:0.059 / U:0.448 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site