On Thu, Oct 24, 2013 at 03:21:37PM -0400, Richard Yao wrote: >On 10/24/2013 02:39 PM, WebDawg wrote: >> On Thu, Oct 24, 2013 at 8:25 AM, Richard Yao <[email protected]> wrote: >>> GCC can generate code using MMX, SSE and/or SSE2 instructions on x86_64. >>> That could explain the discrepancy between the benchmark results for the >>> original ZFS lzjb implementation and the BSD version and claims by the >>> FreeBSD developers. To my knowledge, those instructions are not >>> permissible on any current Open ZFS platform. That could mean that the >>> benchmark numbers for Strontium/Justin's version could be lower than >>> what the benchmark numbers suggest. >> Why are the MMX, SSE/SSE2 instructions not permissible? >Each context switch from ring 3 to ring 0 must copy the registers to the >stack and they must be read off the stack when returning. Most (all?) >production kernels avoid the use of x87, MMX and SSE registers to >registers to save time on the copies.
the linux kernel uses hand coded sse/altivec etc. in various places. mostly in md raid and crypto as far as I can see from a quick 'grep -r xmm'. eg. these messages from 'modprobe raid6' come from lib/raid6/*sse* -> [170772.687659] async_tx: api initialized (async) [170772.690196] xor: measuring software checksum speed [170772.700007] prefetch64-sse: 9820.000 MB/sec [170772.710007] generic_sse: 8716.000 MB/sec [170772.710011] xor: using function: prefetch64-sse (9820.000 MB/sec) [170772.732008] raid6: sse2x1 4093 MB/s [170772.749005] raid6: sse2x2 5863 MB/s [170772.766008] raid6: sse2x4 7199 MB/s [170772.766010] raid6: using algorithm sse2x4 (7199 MB/s) [170772.766011] raid6: using ssse3x2 recovery algorithm [170772.775038] md: raid6 personality registered for level 6 [170772.775041] md: raid5 personality registered for level 5 [170772.775043] md: raid4 personality registered for level 4 so it might be worth it for OpenZFS too as long as there are big chunks of data to chew on that can hide the satrtup/shutdown cost of using the instructions. just my 2c. cheers, robin _______________________________________________ developer mailing list [email protected] http://lists.open-zfs.org/mailman/listinfo/developer
