[torquedev] cpuset support

Craig West cwest at astro.umass.edu
Sat Nov 17 13:59:55 MST 2007

I thought it might be worth mentioning that there is another interface 
in the kernel to allow access to the core_id and siblings information.

In the Linux Documentation that comes with the kernel there is a file 
called cputopology.txt
This files describes the sysfs interface to the information listed in 
This information only appeared in the 2.6.17 kernel and onward from what 
I can gather. Also the extra information in /proc/cpuinfo that relates 
to "cpu cores" and "core id" appears to have been added as a patch to 
the 2.6.12-rc2 kernel.

Here is a snippet:
-------- CUT --------
1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
represent the physical package id of  cpu X;
2) /sys/devices/system/cpu/cpuX/topology/core_id:
represent the cpu core id to cpu X;
3) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
represent the thread siblings to cpu X in the same core;
4) /sys/devices/system/cpu/cpuX/topology/core_siblings:
represent the thread siblings to cpu X in the same physical package;
-------- CUT --------

The last two appear to be bit masks. The interesting point here is that 
we can detect which cores are in the same physical package. This relates 
to item (3) from Chris (A way in which to advertise the organisation of 
which core is in which socket). The only real issue being it is only on 
2.6.17+ kernels.
Also we can detect SMT type processors - not sure we need to advertise 
this (or want to) but it appears to be there as well.

It appears from this documentation that the RHEL4 (UP3) Intel machine 
mentioned in my email regarding machines we looked at during SC07, is 
wrong in the way it describes the Core ID. But this may be due to the 
fact that it is a back-ported kernel patch as RHEL (UP3) is a 2.6.9 kernel.


More information about the torquedev mailing list