How do you detect that hyperthreading is activated?
Hi,
I have an application that needs to check if a linux kernel has booted with hyperthreading enabled on ia32, in order to do some special tweaks. I know how you detect that a CPU supports hyperthreading, but how do you detect that the kernel has booted with hyperthreading activated?
And by hyperthreading activated I mean that the current number of CPUs, for example 8, are actually 4 physical CPUs and 4 logical CPUs.
Is there a way that I can get at the logical/physical CPU bits, as reported by the CPUID instruction, of all available CPUs? Or is there an even better way?
/Bj�rn
Quoted 3 lines · Björn Antonsson
Is there a way that I can get at the logical/physical CPU bits, as reported by the CPUID instruction, of all available CPUs? Or is there an even better way?
/dev/cpu/*/cpuid
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs