Skip to content

Commit 05a463e

Browse files
Tian TaoJonathan Corbet
authored andcommitted
docs: cputopology: move the sysfs ABI description to right place
Documentation/admin-guide/cputopology.rst is the wrong place to describe sysfs ABI. So move the cputopology ABI things to Documentation/ABI/stable/sysfs-devices-system-cpu and add a reference to ABI doc in Documentation/admin-guide/cputopology.rst. Link: https://lkml.kernel.org/r/20210319041618.14316-1-song.bao.hua@hisilicon.com Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> Link: https://lore.kernel.org/r/20210611052249.25776-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 0057475 commit 05a463e

2 files changed

Lines changed: 87 additions & 81 deletions

File tree

Documentation/ABI/stable/sysfs-devices-system-cpu

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,86 @@ Description: Default value for the Data Stream Control Register (DSCR) on
2323
here).
2424
If set by a process it will be inherited by child processes.
2525
Values: 64 bit unsigned integer (bit field)
26+
27+
What: /sys/devices/system/cpu/cpuX/topology/physical_package_id
28+
Description: physical package id of cpuX. Typically corresponds to a physical
29+
socket number, but the actual value is architecture and platform
30+
dependent.
31+
Values: integer
32+
33+
What: /sys/devices/system/cpu/cpuX/topology/die_id
34+
Description: the CPU die ID of cpuX. Typically it is the hardware platform's
35+
identifier (rather than the kernel's). The actual value is
36+
architecture and platform dependent.
37+
Values: integer
38+
39+
What: /sys/devices/system/cpu/cpuX/topology/core_id
40+
Description: the CPU core ID of cpuX. Typically it is the hardware platform's
41+
identifier (rather than the kernel's). The actual value is
42+
architecture and platform dependent.
43+
Values: integer
44+
45+
What: /sys/devices/system/cpu/cpuX/topology/book_id
46+
Description: the book ID of cpuX. Typically it is the hardware platform's
47+
identifier (rather than the kernel's). The actual value is
48+
architecture and platform dependent. it's only used on s390.
49+
Values: integer
50+
51+
What: /sys/devices/system/cpu/cpuX/topology/drawer_id
52+
Description: the drawer ID of cpuX. Typically it is the hardware platform's
53+
identifier (rather than the kernel's). The actual value is
54+
architecture and platform dependent. it's only used on s390.
55+
Values: integer
56+
57+
What: /sys/devices/system/cpu/cpuX/topology/core_cpus
58+
Description: internal kernel map of CPUs within the same core.
59+
(deprecated name: "thread_siblings")
60+
Values: hexadecimal bitmask.
61+
62+
What: /sys/devices/system/cpu/cpuX/topology/core_cpus_list
63+
Description: human-readable list of CPUs within the same core.
64+
The format is like 0-3, 8-11, 14,17.
65+
(deprecated name: "thread_siblings_list").
66+
Values: decimal list.
67+
68+
What: /sys/devices/system/cpu/cpuX/topology/package_cpus
69+
Description: internal kernel map of the CPUs sharing the same physical_package_id.
70+
(deprecated name: "core_siblings").
71+
Values: hexadecimal bitmask.
72+
73+
What: /sys/devices/system/cpu/cpuX/topology/package_cpus_list
74+
Description: human-readable list of CPUs sharing the same physical_package_id.
75+
The format is like 0-3, 8-11, 14,17.
76+
(deprecated name: "core_siblings_list")
77+
Values: decimal list.
78+
79+
What: /sys/devices/system/cpu/cpuX/topology/die_cpus
80+
Description: internal kernel map of CPUs within the same die.
81+
Values: hexadecimal bitmask.
82+
83+
What: /sys/devices/system/cpu/cpuX/topology/die_cpus_list
84+
Description: human-readable list of CPUs within the same die.
85+
The format is like 0-3, 8-11, 14,17.
86+
Values: decimal list.
87+
88+
What: /sys/devices/system/cpu/cpuX/topology/book_siblings
89+
Description: internal kernel map of cpuX's hardware threads within the same
90+
book_id. it's only used on s390.
91+
Values: hexadecimal bitmask.
92+
93+
What: /sys/devices/system/cpu/cpuX/topology/book_siblings_list
94+
Description: human-readable list of cpuX's hardware threads within the same
95+
book_id.
96+
The format is like 0-3, 8-11, 14,17. it's only used on s390.
97+
Values: decimal list.
98+
99+
What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings
100+
Description: internal kernel map of cpuX's hardware threads within the same
101+
drawer_id. it's only used on s390.
102+
Values: hexadecimal bitmask.
103+
104+
What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings_list
105+
Description: human-readable list of cpuX's hardware threads within the same
106+
drawer_id.
107+
The format is like 0-3, 8-11, 14,17. it's only used on s390.
108+
Values: decimal list.

Documentation/admin-guide/cputopology.rst

Lines changed: 4 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,87 +2,10 @@
22
How CPU topology info is exported via sysfs
33
===========================================
44

5-
Export CPU topology info via sysfs. Items (attributes) are similar
6-
to /proc/cpuinfo output of some architectures. They reside in
7-
/sys/devices/system/cpu/cpuX/topology/:
8-
9-
physical_package_id:
10-
11-
physical package id of cpuX. Typically corresponds to a physical
12-
socket number, but the actual value is architecture and platform
13-
dependent.
14-
15-
die_id:
16-
17-
the CPU die ID of cpuX. Typically it is the hardware platform's
18-
identifier (rather than the kernel's). The actual value is
19-
architecture and platform dependent.
20-
21-
core_id:
22-
23-
the CPU core ID of cpuX. Typically it is the hardware platform's
24-
identifier (rather than the kernel's). The actual value is
25-
architecture and platform dependent.
26-
27-
book_id:
28-
29-
the book ID of cpuX. Typically it is the hardware platform's
30-
identifier (rather than the kernel's). The actual value is
31-
architecture and platform dependent.
32-
33-
drawer_id:
34-
35-
the drawer ID of cpuX. Typically it is the hardware platform's
36-
identifier (rather than the kernel's). The actual value is
37-
architecture and platform dependent.
38-
39-
core_cpus:
40-
41-
internal kernel map of CPUs within the same core.
42-
(deprecated name: "thread_siblings")
43-
44-
core_cpus_list:
45-
46-
human-readable list of CPUs within the same core.
47-
(deprecated name: "thread_siblings_list");
48-
49-
package_cpus:
50-
51-
internal kernel map of the CPUs sharing the same physical_package_id.
52-
(deprecated name: "core_siblings")
53-
54-
package_cpus_list:
55-
56-
human-readable list of CPUs sharing the same physical_package_id.
57-
(deprecated name: "core_siblings_list")
58-
59-
die_cpus:
60-
61-
internal kernel map of CPUs within the same die.
62-
63-
die_cpus_list:
64-
65-
human-readable list of CPUs within the same die.
66-
67-
book_siblings:
68-
69-
internal kernel map of cpuX's hardware threads within the same
70-
book_id.
71-
72-
book_siblings_list:
73-
74-
human-readable list of cpuX's hardware threads within the same
75-
book_id.
76-
77-
drawer_siblings:
78-
79-
internal kernel map of cpuX's hardware threads within the same
80-
drawer_id.
81-
82-
drawer_siblings_list:
83-
84-
human-readable list of cpuX's hardware threads within the same
85-
drawer_id.
5+
CPU topology info is exported via sysfs. Items (attributes) are similar
6+
to /proc/cpuinfo output of some architectures. They reside in
7+
/sys/devices/system/cpu/cpuX/topology/. Please refer to the ABI file:
8+
Documentation/ABI/stable/sysfs-devices-system-cpu.
869

8710
Architecture-neutral, drivers/base/topology.c, exports these attributes.
8811
However, the book and drawer related sysfs files will only be created if

0 commit comments

Comments
 (0)