CPUID: Difference between revisions
mNo edit summary |
|||
| Line 24: | Line 24: | ||
* the process must be able to bind itself to a CPU (usually requiring root), or | * the process must be able to bind itself to a CPU (usually requiring root), or | ||
* the operating system must provide a world-readable interface (ie, the process never calls CPUID directly) | * the operating system must provide a world-readable interface (ie, the process never calls CPUID directly) | ||
On [[Linux APIs|Linux]], the <tt>/dev/cpuid(4)</tt> device provides an obsolete interface to CPUID. On modern systems, it is chmod'd 0440, and its use is discouraged. Instead, since [http://lkml.indiana.edu/hypermail/linux/kernel/0801.3/2419.html at least 2.6.24] a [[sysfs]] interface has been supported; see <tt>/sys/devices/system/cpu/*/</tt> | On [[Linux APIs|Linux]], the <tt>/dev/cpuid(4)</tt> device provides an obsolete interface to CPUID. On modern systems, it is chmod'd 0440, and its use is discouraged. Instead, since [http://lkml.indiana.edu/hypermail/linux/kernel/0801.3/2419.html at least 2.6.24] a [[sysfs]] interface has been supported; see <tt>/sys/devices/system/cpu/*/</tt>:<pre>[dumbledore](0) $ for i in /sys/devices/system/cpu/cpu0/cache/*/* /sys/devices/system/cpu/cpu0/topology/* ; do echo -n "`basename $i`: " && cat $i ; done | ||
coherency_line_size: 64 | |||
level: 1 | |||
number_of_sets: 64 | |||
physical_line_partition: 1 | |||
shared_cpu_map: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000101 | |||
size: 32K | |||
type: Data | |||
ways_of_associativity: 8 | |||
coherency_line_size: 64 | |||
level: 1 | |||
number_of_sets: 128 | |||
physical_line_partition: 1 | |||
shared_cpu_map: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000101 | |||
size: 32K | |||
type: Instruction | |||
ways_of_associativity: 4 | |||
coherency_line_size: 64 | |||
level: 2 | |||
number_of_sets: 512 | |||
physical_line_partition: 1 | |||
shared_cpu_map: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000101 | |||
size: 256K | |||
type: Unified | |||
ways_of_associativity: 8 | |||
coherency_line_size: 64 | |||
level: 3 | |||
number_of_sets: 8192 | |||
physical_line_partition: 1 | |||
shared_cpu_map: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00005555 | |||
size: 8192K | |||
type: Unified | |||
ways_of_associativity: 16 | |||
core_id: 0 | |||
core_siblings: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00005555 | |||
physical_package_id: 1 | |||
thread_siblings: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000101 | |||
[dumbledore](0) $ </pre> | |||
==See Also== | ==See Also== | ||