aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib/memzero.S
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-05-21 22:17:17 -0400
committerNicolas Pitre <nico@cam.org>2009-05-29 22:38:33 -0400
commitcb9dc92c0a1b76165c8c334402e27191084b2047 (patch)
tree92e7d43692bae2facd227a3c4c8757cf1a1754d0 /arch/arm/lib/memzero.S
parent39ec58f3fea47c242724109cc1da999f74810bbc (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 'arch/arm/lib/memzero.S')
0 files changed, 0 insertions, 0 deletions