Re: How to measure enable_kernel_fpu overhead?
From: George Spelvin
Date: Sat Jun 04 2011 - 21:50:34 EST
> 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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/