From: Robin Getz Date: Tue, 4 May 2010 14:59:21 +0000 (+0000) Subject: Blackfin: optimize strncpy a bit X-Git-Tag: v2.6.35-rc1~410^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=648eee52ccdc623e21b920d6048e93490a4860a7;p=pandora-kernel.git Blackfin: optimize strncpy a bit 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 Signed-off-by: Mike Frysinger --- Reading git-diff-tree failed