Determining if the current processor is Hyperthreaded
Hey folks,
Is there a quick way to determine if the current processor is Hyperthreaded, and if so, which logical processor represents the other thread on the chip? Please cc replies to me as I am not subscribed to the list :-)
Thanks,
Athul
Quoted 6 lines · Athul Acharya
Hey folks,
Is there a quick way to determine if the current processor is Hyperthreaded, and if so, which logical processor represents the other thread on the chip? Please cc replies to me as I am not subscribed to the list :-)
Look at /proc/cpuinfo and see if "siblings" is listed and more than one. There is no "other thread" there, it's like "which one is the other hand?"
Signature · 3 lines
-bill davidsen ([email protected]) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Quoted 10 lines · Bill Davidsen
Quoted 6 lines · Athul Acharya
Hey folks,
Is there a quick way to determine if the current processor is Hyperthreaded, and if so, which logical processor represents the other thread on the chip? Please cc replies to me as I am not subscribed to the list :-)
Look at
/proc/cpuinfoand see if "siblings" is listed and more than one. There is no "other thread" there, it's like "which one is the other hand?"
Sorry, I should've been more specific -- I mean within the kernel. That is, I want to know whether the current cpu I (kernel code) am executing on is hyperthreaded, and if so, which logical cpu represents the other thread on chip.
Athul
Quoted 3 lines · Athul Acharya
That is, I want to know whether the current cpu I (kernel code) am executing on is hyperthreaded, and if so, which logical cpu represents the other thread on chip.
Trying again, as it seems like a simple thing that really should exist
-- is_cpu_hyperthreaded(smp_processor_id()) -- or something similar. Anyone?
Athul
Quoted 8 lines · Athul Acharya
Quoted 3 lines · Athul Acharya
That is, I want to know whether the current cpu I (kernel code) am executing on is hyperthreaded, and if so, which logical cpu represents the other thread on chip.
Trying again, as it seems like a simple thing that really should exist
-- is_cpu_hyperthreaded(smp_processor_id()) -- or something similar. Anyone?
Is anyone receiving this? I should've mentioned in subsequent mails (I did in the original) that I'm not subscribed so any replies need to be cc'd to me :)
Athul