Re: x86: faster strncpy_from_user()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/10/2012 04:29 PM, David Miller wrote:
> 
> Just wanted to mention that handling the detect zeroes operations on
> cpus that require alignment is easy, just rewind the pointer at the
> beginning to be aligned and "or" in a mask of 0xff for each alignment
> pad byte into the initially loaded word.
> 

Even on machines which don't require alignment it will still be faster
to do aligned memory references only, not counting the startup cost
(which is substantial in this case, of course, since the average length
is so short.)  However, it also neatly avoids the page overrun problem.

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux