Messages in this thread | | | Date | 4 Jun 2011 21:50:23 -0400 | From | "George Spelvin" <> | Subject | Re: How to measure enable_kernel_fpu overhead? |
| |
> Different CPU models. This years CPUs does this and next years that.
Er, yes, exactly. That's why we have multiple code paths, and run-time selection of the best. The basic principle is used rather a lot in the Linux kernel, e.g. the alternative() feature.
To me the closest equivalent is the RAID6 code, which has no less than 12 different versions (5 integer, 4 AltiVec, 1 MMX, 1 SSE1, and 1 SSE2), and on x86 it benchmarks the 8 different versions at boot time and chooses the best.
What confuses me is: > I would suggest KISS.
This suggestion is not quite clear to me; I'm not quite sure what you think is "simple". Do you mean always use the integer code and ignore the SSE registers? Or something else?
Could you expand on that remark a little, please?
Thank you!
| |