Performance regression in write() syscall
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Andi Kleen
Review static inline int __copy_from_user_nocache(void *dst, · line 199
Quoted 10 lines · Salman Qazi
(quoted diff) +4
-1@@ -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.
Quoted 2 lines
That check would need to be higher up the VFS stack (above
filemap.ccode) before the copies are split up.
It's bigger-or-equal, so this test is correct.