diff options
author | Alex Chiang <achiang@hp.com> | 2009-10-21 23:45:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-30 17:59:52 -0400 |
commit | 663fb2fc733006f685400fb44551303b72b61a88 (patch) | |
tree | fd8e8ed2d288a5e9e109a8391d59272b8957cede /Documentation/cputopology.txt | |
parent | d93fc863d2d2cea1057996c39cef368f41741448 (diff) |
Documentation: ABI: /sys/devices/system/cpu/cpu#/ topology files
Add brief descriptions for the following sysfs files:
/sys/devices/system/cpu/cpu#/topology/core_id
/sys/devices/system/cpu/cpu#/topology/core_siblings
/sys/devices/system/cpu/cpu#/topology/core_siblings_list
/sys/devices/system/cpu/cpu#/topology/physical_package_id
/sys/devices/system/cpu/cpu#/topology/thread_siblings
/sys/devices/system/cpu/cpu#/topology/thread_siblings_list
The descriptions in Documentation/cputopology.txt weren't very
informative, so I attempted a better description based on code
reading and hopeful guessing.
Updated Documentation/cputopology.txt with the better descriptions and
fixed some style issues.
Cc: Mike Travis <travis@sgi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/cputopology.txt')
-rw-r--r-- | Documentation/cputopology.txt | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt index b41f3e58aefa..f1c5c4bccd3e 100644 --- a/Documentation/cputopology.txt +++ b/Documentation/cputopology.txt | |||
@@ -1,15 +1,28 @@ | |||
1 | 1 | ||
2 | Export cpu topology info via sysfs. Items (attributes) are similar | 2 | Export CPU topology info via sysfs. Items (attributes) are similar |
3 | to /proc/cpuinfo. | 3 | to /proc/cpuinfo. |
4 | 4 | ||
5 | 1) /sys/devices/system/cpu/cpuX/topology/physical_package_id: | 5 | 1) /sys/devices/system/cpu/cpuX/topology/physical_package_id: |
6 | represent the physical package id of cpu X; | 6 | |
7 | physical package id of cpuX. Typically corresponds to a physical | ||
8 | socket number, but the actual value is architecture and platform | ||
9 | dependent. | ||
10 | |||
7 | 2) /sys/devices/system/cpu/cpuX/topology/core_id: | 11 | 2) /sys/devices/system/cpu/cpuX/topology/core_id: |
8 | represent the cpu core id to cpu X; | 12 | |
13 | the CPU core ID of cpuX. Typically it is the hardware platform's | ||
14 | identifier (rather than the kernel's). The actual value is | ||
15 | architecture and platform dependent. | ||
16 | |||
9 | 3) /sys/devices/system/cpu/cpuX/topology/thread_siblings: | 17 | 3) /sys/devices/system/cpu/cpuX/topology/thread_siblings: |
10 | represent the thread siblings to cpu X in the same core; | 18 | |
19 | internel kernel map of cpuX's hardware threads within the same | ||
20 | core as cpuX | ||
21 | |||
11 | 4) /sys/devices/system/cpu/cpuX/topology/core_siblings: | 22 | 4) /sys/devices/system/cpu/cpuX/topology/core_siblings: |
12 | represent the thread siblings to cpu X in the same physical package; | 23 | |
24 | internal kernel map of cpuX's hardware threads within the same | ||
25 | physical_package_id. | ||
13 | 26 | ||
14 | To implement it in an architecture-neutral way, a new source file, | 27 | To implement it in an architecture-neutral way, a new source file, |
15 | drivers/base/topology.c, is to export the 4 attributes. | 28 | drivers/base/topology.c, is to export the 4 attributes. |
@@ -32,32 +45,32 @@ not defined by include/asm-XXX/topology.h: | |||
32 | 3) thread_siblings: just the given CPU | 45 | 3) thread_siblings: just the given CPU |
33 | 4) core_siblings: just the given CPU | 46 | 4) core_siblings: just the given CPU |
34 | 47 | ||
35 | Additionally, cpu topology information is provided under | 48 | Additionally, CPU topology information is provided under |
36 | /sys/devices/system/cpu and includes these files. The internal | 49 | /sys/devices/system/cpu and includes these files. The internal |
37 | source for the output is in brackets ("[]"). | 50 | source for the output is in brackets ("[]"). |
38 | 51 | ||
39 | kernel_max: the maximum cpu index allowed by the kernel configuration. | 52 | kernel_max: the maximum CPU index allowed by the kernel configuration. |
40 | [NR_CPUS-1] | 53 | [NR_CPUS-1] |
41 | 54 | ||
42 | offline: cpus that are not online because they have been | 55 | offline: CPUs that are not online because they have been |
43 | HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit | 56 | HOTPLUGGED off (see cpu-hotplug.txt) or exceed the limit |
44 | of cpus allowed by the kernel configuration (kernel_max | 57 | of CPUs allowed by the kernel configuration (kernel_max |
45 | above). [~cpu_online_mask + cpus >= NR_CPUS] | 58 | above). [~cpu_online_mask + cpus >= NR_CPUS] |
46 | 59 | ||
47 | online: cpus that are online and being scheduled [cpu_online_mask] | 60 | online: CPUs that are online and being scheduled [cpu_online_mask] |
48 | 61 | ||
49 | possible: cpus that have been allocated resources and can be | 62 | possible: CPUs that have been allocated resources and can be |
50 | brought online if they are present. [cpu_possible_mask] | 63 | brought online if they are present. [cpu_possible_mask] |
51 | 64 | ||
52 | present: cpus that have been identified as being present in the | 65 | present: CPUs that have been identified as being present in the |
53 | system. [cpu_present_mask] | 66 | system. [cpu_present_mask] |
54 | 67 | ||
55 | The format for the above output is compatible with cpulist_parse() | 68 | The format for the above output is compatible with cpulist_parse() |
56 | [see <linux/cpumask.h>]. Some examples follow. | 69 | [see <linux/cpumask.h>]. Some examples follow. |
57 | 70 | ||
58 | In this example, there are 64 cpus in the system but cpus 32-63 exceed | 71 | In this example, there are 64 CPUs in the system but cpus 32-63 exceed |
59 | the kernel max which is limited to 0..31 by the NR_CPUS config option | 72 | the kernel max which is limited to 0..31 by the NR_CPUS config option |
60 | being 32. Note also that cpus 2 and 4-31 are not online but could be | 73 | being 32. Note also that CPUs 2 and 4-31 are not online but could be |
61 | brought online as they are both present and possible. | 74 | brought online as they are both present and possible. |
62 | 75 | ||
63 | kernel_max: 31 | 76 | kernel_max: 31 |
@@ -67,8 +80,8 @@ brought online as they are both present and possible. | |||
67 | present: 0-31 | 80 | present: 0-31 |
68 | 81 | ||
69 | In this example, the NR_CPUS config option is 128, but the kernel was | 82 | In this example, the NR_CPUS config option is 128, but the kernel was |
70 | started with possible_cpus=144. There are 4 cpus in the system and cpu2 | 83 | started with possible_cpus=144. There are 4 CPUs in the system and cpu2 |
71 | was manually taken offline (and is the only cpu that can be brought | 84 | was manually taken offline (and is the only CPU that can be brought |
72 | online.) | 85 | online.) |
73 | 86 | ||
74 | kernel_max: 127 | 87 | kernel_max: 127 |
@@ -78,4 +91,4 @@ online.) | |||
78 | present: 0-3 | 91 | present: 0-3 |
79 | 92 | ||
80 | See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter | 93 | See cpu-hotplug.txt for the possible_cpus=NUM kernel start parameter |
81 | as well as more information on the various cpumask's. | 94 | as well as more information on the various cpumasks. |