On 06/25/12 16:43, Peter Krempa wrote:
Parsing of the processor information from /sys/ didn't take into
account
that cores on different physical processors may have different core
ID's. This resulted in reporting more cores than actually were present.
This patch changes the process of counting cores. So that cores are
counted separately per physical ID.
This patch also adds test data that were used to debug this problem.
---
Looking at this again brings me to another idea:
We're now detecting the procesors only based on core ID's. My patch
modifies this to take physical packages into account. But a better
approach would IMO be to start at NUMA nodes and continue from that.
Each numa node entry in "/sys/devices/system/node/node*/ contains
symlinks to cpu entries belonging to the node. This could solve also the
problem with the AMD MagnyCours CPU that has two numa nodes in one
physical package and is done by a workaround.
When we switch the detection to nodes first we will have data to fill
the nodeinfo structure according to our docs (nodes, sockets per node,
cores per socket and threads per core).
The downside of this would be that the test data in our test suite don't
contain information that'd be needed for this new approach. We'd need to
re-gather those data from all the exotic archs.
Any opinions on this?
Peter