From: Akinobu Mita Date: Fri, 23 Mar 2012 22:02:14 +0000 (-0700) Subject: string: memchr_inv() speed improvements X-Git-Tag: v3.4-rc1~109^2~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f43804bf5f9ae1e60077c5f22aee5fdfe4f09837;p=pandora-kernel.git string: memchr_inv() speed improvements - Generate a 64-bit pattern more efficiently memchr_inv needs to generate a 64-bit pattern filled with a target character. The operation can be done by more efficient way. - Don't call the slow check_bytes() if the memory area is 64-bit aligned memchr_inv compares contiguous 64-bit words with the 64-bit pattern as much as possible. The outside of the region is checked by check_bytes() that scans for each byte. Unfortunately, the first 64-bit word is unexpectedly scanned by check_bytes() even if the memory area is aligned to a 64-bit boundary. Both changes were originally suggested by Eric Dumazet. Signed-off-by: Akinobu Mita Suggested-by: Eric Dumazet Cc: Brian Norris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed