Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136903
b: refs/heads/master
c: 30d697f
h: refs/heads/master
i:
  136901: 26b342b
  136899: 1fd9220
  136895: 3041617
v: v3
  • Loading branch information
Salman Qazi authored and Ingo Molnar committed Feb 24, 2009
1 parent 2d04169 commit ffaf038
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb425afd2183e90a481bb211ff49361a117a3ecc
refs/heads/master: 30d697fa3a25fed809a873b17531a00282dc1234
16 changes: 14 additions & 2 deletions trunk/arch/x86/include/asm/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,26 @@ 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);
/*
* In practice this limit means that large file write()s
* which get chunked to 4K copies get handled via
* non-temporal stores here. Smaller writes get handled
* via regular __copy_from_user():
*/
if (likely(size >= PAGE_SIZE))
return __copy_user_nocache(dst, src, size, 1);
else
return __copy_from_user(dst, src, size);
}

static inline int __copy_from_user_inatomic_nocache(void *dst,
const void __user *src,
unsigned size)
{
return __copy_user_nocache(dst, src, size, 0);
if (likely(size >= PAGE_SIZE))
return __copy_user_nocache(dst, src, size, 0);
else
return __copy_from_user_inatomic(dst, src, size);
}

unsigned long
Expand Down

0 comments on commit ffaf038

Please sign in to comment.