Skip to contentSkip to conversation

CPU numbering & hyperthreading

DISCUSSION Chuck Ebbert 1 participant 1 message Jul 18, 2006

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 9 lines · Andrew Athan

I have two highly CPU/memory/network intensive processes with 3-5 threads each. I am using sched_setaffinity calls to make sure these two processes never compete for the same physical CPU. Am I right to assume that CPU #0 and #1 vs CPU #2 and #3 are separate physical CPUs on a 2-CPU w/ hyperthreading box?

I've spent some time looking, but I did not find documentation on exactly how CPUs are numbered in a hyperthreaded box.

There's no fixed numbering.

If you want to know the die/core/thread layout, check out Documentation/cputopology.txt.

Signature · 2 lines
Chuck
And did we tell you the name of the game, boy, we call it Riding the Gravy Train.