Arnd Bergmann včera navrhl do jádra podporu pro úrovně architektury x86–64 v1 – v4. V současnosti je možné v jádře vybrat AMD K8, Intel P4, Intel Core 2, Intel Atom a obecný x86–64.
Linus Torvalds je však proti. Říká, že celé označování v1 – v4 je zbytečný artefakt z glibc a neměl by se používat. Jádro používá přesnější informace o vlastnostech procesoru z CPUID a to má daleko více různých kombinací než prosté v1 – v4. Například jak se dozvíte o podpoře instrukce cmpxchgb16
? Je to ve v3?
The whole „v2“, „v3“, „v4“ etc naming seems to be some crazy glibc artifact and is stupid and needs to die.
It has no relevance to anything. Please do *not* introduce that mind-fart into the kernel sources.
I have no idea who came up with the „microarchitecture levels“ garbage, but as far as I can tell, it's entirely unofficial, and it's a completely broken model.
There is a very real model for microarchitectural features, and it's the CPUID bits. Trying to linearize those bits is technically wrong, since these things simply aren't some kind of linear progression.
And worse, it's a „simplification“ that literally adds complexity. Now instead of asking „does this CPU support the cmpxchgb16 instruction?“, the question instead becomes one of „what the hell does ‚v3‘ mean again?“
So no. We are *NOT* introducing that idiocy in the kernel.
Linus
(zdroj: phoronix)