39ec58f3fe
This implements {copy_to,clear}_user() by faulting in the userland pages and then using the regular kernel mem{cpy,set}() to copy the data (while holding the page table lock). This is a win if the regular mem{cpy,set}() implementations are faster than the user copy functions, which is the case e.g. on Feroceon, where 8-word STMs (which memcpy() uses under the right conditions) give significantly higher memory write throughput than a sequence of individual 32bit stores. Here are numbers for page sized buffers on some Feroceon cores: - copy_to_user on Orion5x goes from 51 MB/s to 83 MB/s - clear_user on Orion5x goes from 89MB/s to 314MB/s - copy_to_user on Kirkwood goes from 240 MB/s to 356 MB/s - clear_user on Kirkwood goes from 367 MB/s to 1108 MB/s - copy_to_user on Disco-Duo goes from 248 MB/s to 398 MB/s - clear_user on Disco-Duo goes from 328 MB/s to 1741 MB/s Because the setup cost is non negligible, this is worthwhile only if the amount of data to copy is large enough. The operation falls back to the standard implementation when the amount of data is below a certain threshold. This threshold was determined empirically, however some targets could benefit from a lower runtime determined value for optimal results eventually. In the copy_from_user() case, this technique does not provide any worthwhile performance gain due to the fact that any kind of read access allocates the cache and subsequent 32bit loads are just as fast as the equivalent 8-word LDM. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Tested-by: Martin Michlmayr <tbm@cyrius.com> |
||
---|---|---|
.. | ||
boot | ||
common | ||
configs | ||
include/asm | ||
kernel | ||
lib | ||
mach-aaec2000 | ||
mach-at91 | ||
mach-clps711x | ||
mach-davinci | ||
mach-ebsa110 | ||
mach-ep93xx | ||
mach-footbridge | ||
mach-gemini | ||
mach-h720x | ||
mach-imx | ||
mach-integrator | ||
mach-iop13xx | ||
mach-iop32x | ||
mach-iop33x | ||
mach-ixp4xx | ||
mach-ixp23xx | ||
mach-ixp2000 | ||
mach-kirkwood | ||
mach-ks8695 | ||
mach-l7200 | ||
mach-lh7a40x | ||
mach-loki | ||
mach-mmp | ||
mach-msm | ||
mach-mv78xx0 | ||
mach-mx1 | ||
mach-mx2 | ||
mach-mx3 | ||
mach-netx | ||
mach-ns9xxx | ||
mach-omap1 | ||
mach-omap2 | ||
mach-orion5x | ||
mach-pnx4008 | ||
mach-pxa | ||
mach-realview | ||
mach-rpc | ||
mach-s3c24a0/include/mach | ||
mach-s3c2400 | ||
mach-s3c2410 | ||
mach-s3c2412 | ||
mach-s3c2440 | ||
mach-s3c2442 | ||
mach-s3c2443 | ||
mach-s3c6400 | ||
mach-s3c6410 | ||
mach-sa1100 | ||
mach-shark | ||
mach-versatile | ||
mach-w90x900 | ||
mm | ||
nwfpe | ||
oprofile | ||
plat-iop | ||
plat-mxc | ||
plat-omap | ||
plat-orion | ||
plat-pxa | ||
plat-s3c | ||
plat-s3c24xx | ||
plat-s3c64xx | ||
tools | ||
vfp | ||
Kconfig | ||
Kconfig-nommu | ||
Kconfig.debug | ||
Makefile |