- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi. What is the "bulletproof" way of getting number of processor cores for Xeons (especially old ones)?
I am asking because there is value called Maximum number of processor cores in physical processor package (CPUID EAX[31:26] ) which usually shows good value but for some reason for old processors it may be wrong. For example Intel Processor E7220, 2 cores per processor - for 4-way server it showed 4 cores per processor. Oddly /proc/cpuinfo shows good value.
Could someone help with that?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use the Extended Topology Enumeration Leaf (0x0B) if it is supported:
- Invoking CPUID with EAX = 0x0B, ECX = 0x00 will yield NumThreadsPerCore in EBX[0:15].
- Invoking CPUID with EAX = 0x0B, ECX = 0x01 will yield NumThreads in EBX[0:15].
- NumCores = NumThreads / NumThreadsPerCore.
If the Extended Topology Enumeration Leaf (0x0B) is not supported, my fallback is to use the Deterministic Cache Parameters
- Invoking CPUID with EAX = 0x01, ECX = 0x00 will yield NumThreads in EBX[16:23].
- Invoking CPUID with EAX = 0x04, ECX = 0x00 will yield NumCoresLessOne in EAX[26:31].
- NumCores = NumCoresLessOne + 1.
- NumThreadsPerCore = NumThreads / NumCores.
Hope this helps,
...S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
We do it in similar way but unfortunately that is when we also observe double core count.
Any idea what else we could take a look at?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No that's the two ways that were recommended to me by the processor folks (*many* moons ago). I was in the Desktop Boards org, so rarely had to deal with multiprocessor situations, however.
You could try posting this question in the Servers forum; you should see more Xeon-savvy folks over there...
...S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Thanks, I will post question in that forum.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page