]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - Documentation/ABI/testing/sysfs-devices-system-cpu
UBUNTU: SAUCE: Synchronize MDS mitigations with upstream
[mirror_ubuntu-bionic-kernel.git] / Documentation / ABI / testing / sysfs-devices-system-cpu
1 What: /sys/devices/system/cpu/
2 Date: pre-git history
3 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
4 Description:
5 A collection of both global and individual CPU attributes
6
7 Individual CPU attributes are contained in subdirectories
8 named by the kernel's logical CPU number, e.g.:
9
10 /sys/devices/system/cpu/cpu#/
11
12 What: /sys/devices/system/cpu/kernel_max
13 /sys/devices/system/cpu/offline
14 /sys/devices/system/cpu/online
15 /sys/devices/system/cpu/possible
16 /sys/devices/system/cpu/present
17 Date: December 2008
18 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
19 Description: CPU topology files that describe kernel limits related to
20 hotplug. Briefly:
21
22 kernel_max: the maximum cpu index allowed by the kernel
23 configuration.
24
25 offline: cpus that are not online because they have been
26 HOTPLUGGED off or exceed the limit of cpus allowed by the
27 kernel configuration (kernel_max above).
28
29 online: cpus that are online and being scheduled.
30
31 possible: cpus that have been allocated resources and can be
32 brought online if they are present.
33
34 present: cpus that have been identified as being present in
35 the system.
36
37 See Documentation/cputopology.txt for more information.
38
39
40 What: /sys/devices/system/cpu/probe
41 /sys/devices/system/cpu/release
42 Date: November 2009
43 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
44 Description: Dynamic addition and removal of CPU's. This is not hotplug
45 removal, this is meant complete removal/addition of the CPU
46 from the system.
47
48 probe: writes to this file will dynamically add a CPU to the
49 system. Information written to the file to add CPU's is
50 architecture specific.
51
52 release: writes to this file dynamically remove a CPU from
53 the system. Information writtento the file to remove CPU's
54 is architecture specific.
55
56 What: /sys/devices/system/cpu/cpu#/node
57 Date: October 2009
58 Contact: Linux memory management mailing list <linux-mm@kvack.org>
59 Description: Discover NUMA node a CPU belongs to
60
61 When CONFIG_NUMA is enabled, a symbolic link that points
62 to the corresponding NUMA node directory.
63
64 For example, the following symlink is created for cpu42
65 in NUMA node 2:
66
67 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
68
69
70 What: /sys/devices/system/cpu/cpu#/topology/core_id
71 /sys/devices/system/cpu/cpu#/topology/core_siblings
72 /sys/devices/system/cpu/cpu#/topology/core_siblings_list
73 /sys/devices/system/cpu/cpu#/topology/physical_package_id
74 /sys/devices/system/cpu/cpu#/topology/thread_siblings
75 /sys/devices/system/cpu/cpu#/topology/thread_siblings_list
76 Date: December 2008
77 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
78 Description: CPU topology files that describe a logical CPU's relationship
79 to other cores and threads in the same physical package.
80
81 One cpu# directory is created per logical CPU in the system,
82 e.g. /sys/devices/system/cpu/cpu42/.
83
84 Briefly, the files above are:
85
86 core_id: the CPU core ID of cpu#. Typically it is the
87 hardware platform's identifier (rather than the kernel's).
88 The actual value is architecture and platform dependent.
89
90 core_siblings: internal kernel map of cpu#'s hardware threads
91 within the same physical_package_id.
92
93 core_siblings_list: human-readable list of the logical CPU
94 numbers within the same physical_package_id as cpu#.
95
96 physical_package_id: physical package id of cpu#. Typically
97 corresponds to a physical socket number, but the actual value
98 is architecture and platform dependent.
99
100 thread_siblings: internel kernel map of cpu#'s hardware
101 threads within the same core as cpu#
102
103 thread_siblings_list: human-readable list of cpu#'s hardware
104 threads within the same core as cpu#
105
106 See Documentation/cputopology.txt for more information.
107
108
109 What: /sys/devices/system/cpu/cpuidle/current_driver
110 /sys/devices/system/cpu/cpuidle/current_governer_ro
111 Date: September 2007
112 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
113 Description: Discover cpuidle policy and mechanism
114
115 Various CPUs today support multiple idle levels that are
116 differentiated by varying exit latencies and power
117 consumption during idle.
118
119 Idle policy (governor) is differentiated from idle mechanism
120 (driver)
121
122 current_driver: displays current idle mechanism
123
124 current_governor_ro: displays current idle policy
125
126 See files in Documentation/cpuidle/ for more information.
127
128
129 What: /sys/devices/system/cpu/cpu#/cpufreq/*
130 Date: pre-git history
131 Contact: linux-pm@vger.kernel.org
132 Description: Discover and change clock speed of CPUs
133
134 Clock scaling allows you to change the clock speed of the
135 CPUs on the fly. This is a nice method to save battery
136 power, because the lower the clock speed, the less power
137 the CPU consumes.
138
139 There are many knobs to tweak in this directory.
140
141 See files in Documentation/cpu-freq/ for more information.
142
143 In particular, read Documentation/cpu-freq/user-guide.txt
144 to learn how to control the knobs.
145
146
147 What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
148 Date: June 2013
149 Contact: linux-pm@vger.kernel.org
150 Description: Discover CPUs in the same CPU frequency coordination domain
151
152 freqdomain_cpus is the list of CPUs (online+offline) that share
153 the same clock/freq domain (possibly at the hardware level).
154 That information may be hidden from the cpufreq core and the
155 value of related_cpus may be different from freqdomain_cpus. This
156 attribute is useful for user space DVFS controllers to get better
157 power/performance results for platforms using acpi-cpufreq.
158
159 This file is only present if the acpi-cpufreq driver is in use.
160
161
162 What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
163 Date: August 2008
164 KernelVersion: 2.6.27
165 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
166 Description: Disable L3 cache indices
167
168 These files exist in every CPU's cache/index3 directory. Each
169 cache_disable_{0,1} file corresponds to one disable slot which
170 can be used to disable a cache index. Reading from these files
171 on a processor with this functionality will return the currently
172 disabled index for that node. There is one L3 structure per
173 node, or per internal node on MCM machines. Writing a valid
174 index to one of these files will cause the specificed cache
175 index to be disabled.
176
177 All AMD processors with L3 caches provide this functionality.
178 For details, see BKDGs at
179 http://developer.amd.com/documentation/guides/Pages/default.aspx
180
181
182 What: /sys/devices/system/cpu/cpufreq/boost
183 Date: August 2012
184 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
185 Description: Processor frequency boosting control
186
187 This switch controls the boost setting for the whole system.
188 Boosting allows the CPU and the firmware to run at a frequency
189 beyound it's nominal limit.
190 More details can be found in
191 Documentation/admin-guide/pm/cpufreq.rst
192
193
194 What: /sys/devices/system/cpu/cpu#/crash_notes
195 /sys/devices/system/cpu/cpu#/crash_notes_size
196 Date: April 2013
197 Contact: kexec@lists.infradead.org
198 Description: address and size of the percpu note.
199
200 crash_notes: the physical address of the memory that holds the
201 note of cpu#.
202
203 crash_notes_size: size of the note of cpu#.
204
205
206 What: /sys/devices/system/cpu/intel_pstate/max_perf_pct
207 /sys/devices/system/cpu/intel_pstate/min_perf_pct
208 /sys/devices/system/cpu/intel_pstate/no_turbo
209 Date: February 2013
210 Contact: linux-pm@vger.kernel.org
211 Description: Parameters for the Intel P-state driver
212
213 Logic for selecting the current P-state in Intel
214 Sandybridge+ processors. The three knobs control
215 limits for the P-state that will be requested by the
216 driver.
217
218 max_perf_pct: limits the maximum P state that will be requested by
219 the driver stated as a percentage of the available performance.
220
221 min_perf_pct: limits the minimum P state that will be requested by
222 the driver stated as a percentage of the available performance.
223
224 no_turbo: limits the driver to selecting P states below the turbo
225 frequency range.
226
227 More details can be found in
228 Documentation/admin-guide/pm/intel_pstate.rst
229
230 What: /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
231 Date: July 2014(documented, existed before August 2008)
232 Contact: Sudeep Holla <sudeep.holla@arm.com>
233 Linux kernel mailing list <linux-kernel@vger.kernel.org>
234 Description: Parameters for the CPU cache attributes
235
236 allocation_policy:
237 - WriteAllocate: allocate a memory location to a cache line
238 on a cache miss because of a write
239 - ReadAllocate: allocate a memory location to a cache line
240 on a cache miss because of a read
241 - ReadWriteAllocate: both writeallocate and readallocate
242
243 attributes: LEGACY used only on IA64 and is same as write_policy
244
245 coherency_line_size: the minimum amount of data in bytes that gets
246 transferred from memory to cache
247
248 level: the cache hierarchy in the multi-level cache configuration
249
250 number_of_sets: total number of sets in the cache, a set is a
251 collection of cache lines with the same cache index
252
253 physical_line_partition: number of physical cache line per cache tag
254
255 shared_cpu_list: the list of logical cpus sharing the cache
256
257 shared_cpu_map: logical cpu mask containing the list of cpus sharing
258 the cache
259
260 size: the total cache size in kB
261
262 type:
263 - Instruction: cache that only holds instructions
264 - Data: cache that only caches data
265 - Unified: cache that holds both data and instructions
266
267 ways_of_associativity: degree of freedom in placing a particular block
268 of memory in the cache
269
270 write_policy:
271 - WriteThrough: data is written to both the cache line
272 and to the block in the lower-level memory
273 - WriteBack: data is written only to the cache line and
274 the modified cache line is written to main
275 memory only when it is replaced
276
277
278 What: /sys/devices/system/cpu/cpu*/cache/index*/id
279 Date: September 2016
280 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
281 Description: Cache id
282
283 The id provides a unique number for a specific instance of
284 a cache of a particular type. E.g. there may be a level
285 3 unified cache on each socket in a server and we may
286 assign them ids 0, 1, 2, ...
287
288 Note that id value can be non-contiguous. E.g. level 1
289 caches typically exist per core, but there may not be a
290 power of two cores on a socket, so these caches may be
291 numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
292
293 What: /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
294 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
295 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
296 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
297 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
298 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
299 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
300 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
301 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
302 Date: March 2016
303 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
304 Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
305 Description: POWERNV CPUFreq driver's frequency throttle stats directory and
306 attributes
307
308 'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
309 throttle stat attributes for the chip. The throttle stats of a cpu
310 is common across all the cpus belonging to a chip. Below are the
311 throttle attributes exported in the 'throttle_stats' directory:
312
313 - turbo_stat : This file gives the total number of times the max
314 frequency is throttled to lower frequency in turbo (at and above
315 nominal frequency) range of frequencies.
316
317 - sub_turbo_stat : This file gives the total number of times the
318 max frequency is throttled to lower frequency in sub-turbo(below
319 nominal frequency) range of frequencies.
320
321 - unthrottle : This file gives the total number of times the max
322 frequency is unthrottled after being throttled.
323
324 - powercap : This file gives the total number of times the max
325 frequency is throttled due to 'Power Capping'.
326
327 - overtemp : This file gives the total number of times the max
328 frequency is throttled due to 'CPU Over Temperature'.
329
330 - supply_fault : This file gives the total number of times the
331 max frequency is throttled due to 'Power Supply Failure'.
332
333 - overcurrent : This file gives the total number of times the
334 max frequency is throttled due to 'Overcurrent'.
335
336 - occ_reset : This file gives the total number of times the max
337 frequency is throttled due to 'OCC Reset'.
338
339 The sysfs attributes representing different throttle reasons like
340 powercap, overtemp, supply_fault, overcurrent and occ_reset map to
341 the reasons provided by OCC firmware for throttling the frequency.
342
343 What: /sys/devices/system/cpu/cpufreq/policyX/throttle_stats
344 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
345 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
346 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
347 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
348 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
349 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
350 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
351 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
352 Date: March 2016
353 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
354 Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
355 Description: POWERNV CPUFreq driver's frequency throttle stats directory and
356 attributes
357
358 'policyX/throttle_stats' directory and all the attributes are same as
359 the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
360 attributes which give the frequency throttle information of the chip.
361
362 What: /sys/devices/system/cpu/cpuX/regs/
363 /sys/devices/system/cpu/cpuX/regs/identification/
364 /sys/devices/system/cpu/cpuX/regs/identification/midr_el1
365 /sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
366 Date: June 2016
367 Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
368 Description: AArch64 CPU registers
369 'identification' directory exposes the CPU ID registers for
370 identifying model and revision of the CPU.
371
372 What: /sys/devices/system/cpu/cpu#/cpu_capacity
373 Date: December 2016
374 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
375 Description: information about CPUs heterogeneity.
376
377 cpu_capacity: capacity of cpu#.
378
379 What: /sys/devices/system/cpu/vulnerabilities
380 /sys/devices/system/cpu/vulnerabilities/meltdown
381 /sys/devices/system/cpu/vulnerabilities/spectre_v1
382 /sys/devices/system/cpu/vulnerabilities/spectre_v2
383 /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
384 /sys/devices/system/cpu/vulnerabilities/l1tf
385 /sys/devices/system/cpu/vulnerabilities/mds
386 Date: January 2018
387 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
388 Description: Information about CPU vulnerabilities
389
390 The files are named after the code names of CPU
391 vulnerabilities. The output of those files reflects the
392 state of the CPUs in the system. Possible output values:
393
394 "Not affected" CPU is not affected by the vulnerability
395 "Vulnerable" CPU is affected and no mitigation in effect
396 "Mitigation: $M" CPU is affected and mitigation $M is in effect
397
398 See also: Documentation/admin-guide/hw-vuln/index.rst
399
400 What: /sys/devices/system/cpu/smt
401 /sys/devices/system/cpu/smt/active
402 /sys/devices/system/cpu/smt/control
403 Date: June 2018
404 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
405 Description: Control Symetric Multi Threading (SMT)
406
407 active: Tells whether SMT is active (enabled and siblings online)
408
409 control: Read/write interface to control SMT. Possible
410 values:
411
412 "on" SMT is enabled
413 "off" SMT is disabled
414 "forceoff" SMT is force disabled. Cannot be changed.
415 "notsupported" SMT is not supported by the CPU
416
417 If control status is "forceoff" or "notsupported" writes
418 are rejected.