diff options
author | Nicolas Pitre <nico@cam.org> | 2009-05-21 22:17:17 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-05-29 22:38:33 -0400 |
commit | cb9dc92c0a1b76165c8c334402e27191084b2047 (patch) | |
tree | 92e7d43692bae2facd227a3c4c8757cf1a1754d0 /Documentation/ko_KR | |
parent | 39ec58f3fea47c242724109cc1da999f74810bbc (diff) |
[ARM] lower overhead with alternative copy_to_user for small copies
Because the alternate copy_to_user implementation has a higher setup cost
than the standard implementation, the size of the memory area to copy
is tested and the standard implementation invoked instead when that size
is too small. Still, that test is made after the processor has preserved
a bunch of registers on the stack which have to be reloaded right away
needlessly in that case, causing a measurable performance regression
compared to plain usage of the standard implementation only.
To make the size test overhead negligible, let's factorize it out of
the alternate copy_to_user function where it is clear to the compiler
that no stack frame is needed. Thanks to CONFIG_ARM_UNWIND allowing
for frame pointers to be disabled and tail call optimization to kick in,
the overhead in the small copy case becomes only 3 assembly instructions.
A similar trick is applied to clear_user as well.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'Documentation/ko_KR')
0 files changed, 0 insertions, 0 deletions