mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
648eee52cc
Add a little strncpy optimization which can easily cut boot time by 20%. When the kernel is booting with initramfs, it builds up the filesystem from a cpio archive by calling strncpy_from_user() via fs/namei.c's do_getname() on every file in the archive (which can be lots) with a length of PATH_MAX (1024). This causes the dest of the strncpy to be padded with many NUL bytes. This optimization mostly causes these NUL bytes to be padded with a call to memset() which is already optimized for filling memory quickly, but the hardware loop helps a little bit as well. Boot time measured with 'loglevel=0' so UART speed doesn't get in the way. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> |
||
---|---|---|
.. | ||
ashldi3.c | ||
ashrdi3.c | ||
divsi3.S | ||
gcclib.h | ||
ins.S | ||
lshrdi3.c | ||
Makefile | ||
memchr.S | ||
memcmp.S | ||
memcpy.S | ||
memmove.S | ||
memset.S | ||
modsi3.S | ||
muldi3.S | ||
outs.S | ||
smulsi3_highpart.S | ||
strcmp.S | ||
strcpy.S | ||
strncmp.S | ||
strncpy.S | ||
udivsi3.S | ||
umodsi3.S | ||
umulsi3_highpart.S |