lkml.org 
[lkml]   [2009]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Performance regression in write() syscall
Date
Andi Kleen <andi@firstfloor.org> wrote:
> On Mon, Feb 23, 2009 at 06:03:04PM -0800, Salman Qazi wrote:

>> @@ -192,14 +192,20 @@ static inline int __copy_from_user_nocache(void *dst,
>> const void __user *src,
>> unsigned size)
>> {
>> might_sleep();
>> - return __copy_user_nocache(dst, src, size, 1);
>> + if (likely(size >= PAGE_SIZE))
>> + return __copy_user_nocache(dst, src, size, 1);
>> + else
>> + return __copy_from_user(dst, src, size);
>
> I think you disabled it completely, the kernel never really does
> any copies larger than page size because all its internal objects
> are page sized only.
>
> That check would need to be higher up the VFS stack (above filemap.c code)
> before the copies are split up.

It's bigger-or-equal, so this test is correct.



\
 
 \ /
  Last update: 2009-02-24 12:15    [W:0.024 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site