dca230f00d
Optimized version of copy_page() was written with assumption that cache line size is 32 bytes. On Cortex-A8 cache line size is 64 bytes. This patch tries to generalize copy_page() to work with any cache line size if cache line size is multiple of 16 and page size is multiple of two cache line size. After this optimization we've got ~25% speedup on OMAP3(tested in userspace). There is test for kernelspace which trigger copy-on-write after fork(): #include <stdlib.h> #include <string.h> #include <unistd.h> #define BUF_SIZE (10000*4096) #define NFORK 200 int main(int argc, char **argv) { char *buf = malloc(BUF_SIZE); int i; memset(buf, 0, BUF_SIZE); for(i = 0; i < NFORK; i++) { if (fork()) { wait(NULL); } else { int j; for(j = 0; j < BUF_SIZE; j+= 4096) buf[j] = (j & 0xFF) + 1; break; } } free(buf); return 0; } Before optimization this test takes ~66 seconds, after optimization takes ~56 seconds. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> |
||
---|---|---|
.. | ||
ashldi3.S | ||
ashrdi3.S | ||
backtrace.S | ||
bitops.h | ||
changebit.S | ||
clear_user.S | ||
clearbit.S | ||
copy_from_user.S | ||
copy_page.S | ||
copy_template.S | ||
copy_to_user.S | ||
csumipv6.S | ||
csumpartial.S | ||
csumpartialcopy.S | ||
csumpartialcopygeneric.S | ||
csumpartialcopyuser.S | ||
delay.S | ||
div64.S | ||
ecard.S | ||
findbit.S | ||
floppydma.S | ||
getuser.S | ||
io-acorn.S | ||
io-readsb.S | ||
io-readsl.S | ||
io-readsw-armv3.S | ||
io-readsw-armv4.S | ||
io-shark.c | ||
io-writesb.S | ||
io-writesl.S | ||
io-writesw-armv3.S | ||
io-writesw-armv4.S | ||
lib1funcs.S | ||
lshrdi3.S | ||
Makefile | ||
memchr.S | ||
memcpy.S | ||
memmove.S | ||
memset.S | ||
memzero.S | ||
muldi3.S | ||
putuser.S | ||
setbit.S | ||
sha1.S | ||
strchr.S | ||
strncpy_from_user.S | ||
strnlen_user.S | ||
strrchr.S | ||
testchangebit.S | ||
testclearbit.S | ||
testsetbit.S | ||
uaccess_with_memcpy.c | ||
uaccess.S | ||
ucmpdi2.S |