treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / Documentation / ABI / testing / sysfs-devices-system-cpu
blob2e0e3b45d02a7f7bd428d45de2f37265d9055aed
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
7                 Individual CPU attributes are contained in subdirectories
8                 named by the kernel's logical CPU number, e.g.:
10                 /sys/devices/system/cpu/cpu#/
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:
22                 kernel_max: the maximum cpu index allowed by the kernel
23                 configuration.
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).
29                 online: cpus that are online and being scheduled.
31                 possible: cpus that have been allocated resources and can be
32                 brought online if they are present.
34                 present: cpus that have been identified as being present in
35                 the system.
37                 See Documentation/admin-guide/cputopology.rst for more information.
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.
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.
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.
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
61                 When CONFIG_NUMA is enabled, a symbolic link that points
62                 to the corresponding NUMA node directory.
64                 For example, the following symlink is created for cpu42
65                 in NUMA node 2:
67                 /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
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.
81                 One cpu# directory is created per logical CPU in the system,
82                 e.g. /sys/devices/system/cpu/cpu42/.
84                 Briefly, the files above are:
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.
90                 core_siblings: internal kernel map of cpu#'s hardware threads
91                 within the same physical_package_id.
93                 core_siblings_list: human-readable list of the logical CPU
94                 numbers within the same physical_package_id as cpu#.
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.
100                 thread_siblings: internel kernel map of cpu#'s hardware
101                 threads within the same core as cpu#
103                 thread_siblings_list: human-readable list of cpu#'s hardware
104                 threads within the same core as cpu#
106                 See Documentation/admin-guide/cputopology.rst for more information.
109 What:           /sys/devices/system/cpu/cpuidle/current_driver
110                 /sys/devices/system/cpu/cpuidle/current_governer_ro
111                 /sys/devices/system/cpu/cpuidle/available_governors
112                 /sys/devices/system/cpu/cpuidle/current_governor
113 Date:           September 2007
114 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
115 Description:    Discover cpuidle policy and mechanism
117                 Various CPUs today support multiple idle levels that are
118                 differentiated by varying exit latencies and power
119                 consumption during idle.
121                 Idle policy (governor) is differentiated from idle mechanism
122                 (driver)
124                 current_driver: (RO) displays current idle mechanism
126                 current_governor_ro: (RO) displays current idle policy
128                 With the cpuidle_sysfs_switch boot option enabled (meant for
129                 developer testing), the following three attributes are visible
130                 instead:
132                 current_driver: same as described above
134                 available_governors: (RO) displays a space separated list of
135                 available governors
137                 current_governor: (RW) displays current idle policy. Users can
138                 switch the governor at runtime by writing to this file.
140                 See Documentation/admin-guide/pm/cpuidle.rst and
141                 Documentation/driver-api/pm/cpuidle.rst for more information.
144 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
145                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency
146                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/power
147                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/time
148                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
149                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/above
150                 /sys/devices/system/cpu/cpuX/cpuidle/stateN/below
151 Date:           September 2007
152 KernelVersion:  v2.6.24
153 Contact:        Linux power management list <linux-pm@vger.kernel.org>
154 Description:
155                 The directory /sys/devices/system/cpu/cpuX/cpuidle contains per
156                 logical CPU specific cpuidle information for each online cpu X.
157                 The processor idle states which are available for use have the
158                 following attributes:
160                 name: (RO) Name of the idle state (string).
162                 latency: (RO) The latency to exit out of this idle state (in
163                 microseconds).
165                 power: (RO) The power consumed while in this idle state (in
166                 milliwatts).
168                 time: (RO) The total time spent in this idle state (in microseconds).
170                 usage: (RO) Number of times this state was entered (a count).
172                 above: (RO) Number of times this state was entered, but the
173                        observed CPU idle duration was too short for it (a count).
175                 below: (RO) Number of times this state was entered, but the
176                        observed CPU idle duration was too long for it (a count).
178 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
179 Date:           February 2008
180 KernelVersion:  v2.6.25
181 Contact:        Linux power management list <linux-pm@vger.kernel.org>
182 Description:
183                 (RO) A small description about the idle state (string).
186 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
187 Date:           March 2012
188 KernelVersion:  v3.10
189 Contact:        Linux power management list <linux-pm@vger.kernel.org>
190 Description:
191                 (RW) Option to disable this idle state (bool). The behavior and
192                 the effect of the disable variable depends on the implementation
193                 of a particular governor. In the ladder governor, for example,
194                 it is not coherent, i.e. if one is disabling a light state, then
195                 all deeper states are disabled as well, but the disable variable
196                 does not reflect it. Likewise, if one enables a deep state but a
197                 lighter state still is disabled, then this has no effect.
199 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/default_status
200 Date:           December 2019
201 KernelVersion:  v5.6
202 Contact:        Linux power management list <linux-pm@vger.kernel.org>
203 Description:
204                 (RO) The default status of this state, "enabled" or "disabled".
206 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
207 Date:           March 2014
208 KernelVersion:  v3.15
209 Contact:        Linux power management list <linux-pm@vger.kernel.org>
210 Description:
211                 (RO) Display the target residency i.e. the minimum amount of
212                 time (in microseconds) this cpu should spend in this idle state
213                 to make the transition worth the effort.
215 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
216 Date:           March 2018
217 KernelVersion:  v4.17
218 Contact:        Linux power management list <linux-pm@vger.kernel.org>
219 Description:
220                 Idle state usage statistics related to suspend-to-idle.
222                 This attribute group is only present for states that can be
223                 used in suspend-to-idle with suspended timekeeping.
225 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
226 Date:           March 2018
227 KernelVersion:  v4.17
228 Contact:        Linux power management list <linux-pm@vger.kernel.org>
229 Description:
230                 Total time spent by the CPU in suspend-to-idle (with scheduler
231                 tick suspended) after requesting this state.
233 What:           /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
234 Date:           March 2018
235 KernelVersion:  v4.17
236 Contact:        Linux power management list <linux-pm@vger.kernel.org>
237 Description:
238                 Total number of times this state has been requested by the CPU
239                 while entering suspend-to-idle.
241 What:           /sys/devices/system/cpu/cpu#/cpufreq/*
242 Date:           pre-git history
243 Contact:        linux-pm@vger.kernel.org
244 Description:    Discover and change clock speed of CPUs
246                 Clock scaling allows you to change the clock speed of the
247                 CPUs on the fly. This is a nice method to save battery
248                 power, because the lower the clock speed, the less power
249                 the CPU consumes.
251                 There are many knobs to tweak in this directory.
253                 See files in Documentation/cpu-freq/ for more information.
256 What:           /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
257 Date:           June 2013
258 Contact:        linux-pm@vger.kernel.org
259 Description:    Discover CPUs in the same CPU frequency coordination domain
261                 freqdomain_cpus is the list of CPUs (online+offline) that share
262                 the same clock/freq domain (possibly at the hardware level).
263                 That information may be hidden from the cpufreq core and the
264                 value of related_cpus may be different from freqdomain_cpus. This
265                 attribute is useful for user space DVFS controllers to get better
266                 power/performance results for platforms using acpi-cpufreq.
268                 This file is only present if the acpi-cpufreq driver is in use.
271 What:           /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
272 Date:           August 2008
273 KernelVersion:  2.6.27
274 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
275 Description:    Disable L3 cache indices
277                 These files exist in every CPU's cache/index3 directory. Each
278                 cache_disable_{0,1} file corresponds to one disable slot which
279                 can be used to disable a cache index. Reading from these files
280                 on a processor with this functionality will return the currently
281                 disabled index for that node. There is one L3 structure per
282                 node, or per internal node on MCM machines. Writing a valid
283                 index to one of these files will cause the specificed cache
284                 index to be disabled.
286                 All AMD processors with L3 caches provide this functionality.
287                 For details, see BKDGs at
288                 http://developer.amd.com/documentation/guides/Pages/default.aspx
291 What:           /sys/devices/system/cpu/cpufreq/boost
292 Date:           August 2012
293 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
294 Description:    Processor frequency boosting control
296                 This switch controls the boost setting for the whole system.
297                 Boosting allows the CPU and the firmware to run at a frequency
298                 beyound it's nominal limit.
299                 More details can be found in
300                 Documentation/admin-guide/pm/cpufreq.rst
303 What:           /sys/devices/system/cpu/cpu#/crash_notes
304                 /sys/devices/system/cpu/cpu#/crash_notes_size
305 Date:           April 2013
306 Contact:        kexec@lists.infradead.org
307 Description:    address and size of the percpu note.
309                 crash_notes: the physical address of the memory that holds the
310                 note of cpu#.
312                 crash_notes_size: size of the note of cpu#.
315 What:           /sys/devices/system/cpu/intel_pstate/max_perf_pct
316                 /sys/devices/system/cpu/intel_pstate/min_perf_pct
317                 /sys/devices/system/cpu/intel_pstate/no_turbo
318 Date:           February 2013
319 Contact:        linux-pm@vger.kernel.org
320 Description:    Parameters for the Intel P-state driver
322                 Logic for selecting the current P-state in Intel
323                 Sandybridge+ processors. The three knobs control
324                 limits for the P-state that will be requested by the
325                 driver.
327                 max_perf_pct: limits the maximum P state that will be requested by
328                 the driver stated as a percentage of the available performance.
330                 min_perf_pct: limits the minimum P state that will be requested by
331                 the driver stated as a percentage of the available performance.
333                 no_turbo: limits the driver to selecting P states below the turbo
334                 frequency range.
336                 More details can be found in
337                 Documentation/admin-guide/pm/intel_pstate.rst
339 What:           /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
340 Date:           July 2014(documented, existed before August 2008)
341 Contact:        Sudeep Holla <sudeep.holla@arm.com>
342                 Linux kernel mailing list <linux-kernel@vger.kernel.org>
343 Description:    Parameters for the CPU cache attributes
345                 allocation_policy:
346                         - WriteAllocate: allocate a memory location to a cache line
347                                          on a cache miss because of a write
348                         - ReadAllocate: allocate a memory location to a cache line
349                                         on a cache miss because of a read
350                         - ReadWriteAllocate: both writeallocate and readallocate
352                 attributes: LEGACY used only on IA64 and is same as write_policy
354                 coherency_line_size: the minimum amount of data in bytes that gets
355                                      transferred from memory to cache
357                 level: the cache hierarchy in the multi-level cache configuration
359                 number_of_sets: total number of sets in the cache, a set is a
360                                 collection of cache lines with the same cache index
362                 physical_line_partition: number of physical cache line per cache tag
364                 shared_cpu_list: the list of logical cpus sharing the cache
366                 shared_cpu_map: logical cpu mask containing the list of cpus sharing
367                                 the cache
369                 size: the total cache size in kB
371                 type:
372                         - Instruction: cache that only holds instructions
373                         - Data: cache that only caches data
374                         - Unified: cache that holds both data and instructions
376                 ways_of_associativity: degree of freedom in placing a particular block
377                                         of memory in the cache
379                 write_policy:
380                         - WriteThrough: data is written to both the cache line
381                                         and to the block in the lower-level memory
382                         - WriteBack: data is written only to the cache line and
383                                      the modified cache line is written to main
384                                      memory only when it is replaced
387 What:           /sys/devices/system/cpu/cpu*/cache/index*/id
388 Date:           September 2016
389 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
390 Description:    Cache id
392                 The id provides a unique number for a specific instance of
393                 a cache of a particular type. E.g. there may be a level
394                 3 unified cache on each socket in a server and we may
395                 assign them ids 0, 1, 2, ...
397                 Note that id value can be non-contiguous. E.g. level 1
398                 caches typically exist per core, but there may not be a
399                 power of two cores on a socket, so these caches may be
400                 numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
402 What:           /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
403                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
404                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
405                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
406                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
407                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
408                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
409                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
410                 /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
411 Date:           March 2016
412 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
413                 Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
414 Description:    POWERNV CPUFreq driver's frequency throttle stats directory and
415                 attributes
417                 'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
418                 throttle stat attributes for the chip. The throttle stats of a cpu
419                 is common across all the cpus belonging to a chip. Below are the
420                 throttle attributes exported in the 'throttle_stats' directory:
422                 - turbo_stat : This file gives the total number of times the max
423                 frequency is throttled to lower frequency in turbo (at and above
424                 nominal frequency) range of frequencies.
426                 - sub_turbo_stat : This file gives the total number of times the
427                 max frequency is throttled to lower frequency in sub-turbo(below
428                 nominal frequency) range of frequencies.
430                 - unthrottle : This file gives the total number of times the max
431                 frequency is unthrottled after being throttled.
433                 - powercap : This file gives the total number of times the max
434                 frequency is throttled due to 'Power Capping'.
436                 - overtemp : This file gives the total number of times the max
437                 frequency is throttled due to 'CPU Over Temperature'.
439                 - supply_fault : This file gives the total number of times the
440                 max frequency is throttled due to 'Power Supply Failure'.
442                 - overcurrent : This file gives the total number of times the
443                 max frequency is throttled due to 'Overcurrent'.
445                 - occ_reset : This file gives the total number of times the max
446                 frequency is throttled due to 'OCC Reset'.
448                 The sysfs attributes representing different throttle reasons like
449                 powercap, overtemp, supply_fault, overcurrent and occ_reset map to
450                 the reasons provided by OCC firmware for throttling the frequency.
452 What:           /sys/devices/system/cpu/cpufreq/policyX/throttle_stats
453                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
454                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
455                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
456                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
457                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
458                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
459                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
460                 /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
461 Date:           March 2016
462 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
463                 Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
464 Description:    POWERNV CPUFreq driver's frequency throttle stats directory and
465                 attributes
467                 'policyX/throttle_stats' directory and all the attributes are same as
468                 the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
469                 attributes which give the frequency throttle information of the chip.
471 What:           /sys/devices/system/cpu/cpuX/regs/
472                 /sys/devices/system/cpu/cpuX/regs/identification/
473                 /sys/devices/system/cpu/cpuX/regs/identification/midr_el1
474                 /sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
475 Date:           June 2016
476 Contact:        Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
477 Description:    AArch64 CPU registers
478                 'identification' directory exposes the CPU ID registers for
479                  identifying model and revision of the CPU.
481 What:           /sys/devices/system/cpu/cpu#/cpu_capacity
482 Date:           December 2016
483 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
484 Description:    information about CPUs heterogeneity.
486                 cpu_capacity: capacity of cpu#.
488 What:           /sys/devices/system/cpu/vulnerabilities
489                 /sys/devices/system/cpu/vulnerabilities/meltdown
490                 /sys/devices/system/cpu/vulnerabilities/spectre_v1
491                 /sys/devices/system/cpu/vulnerabilities/spectre_v2
492                 /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
493                 /sys/devices/system/cpu/vulnerabilities/l1tf
494                 /sys/devices/system/cpu/vulnerabilities/mds
495                 /sys/devices/system/cpu/vulnerabilities/tsx_async_abort
496                 /sys/devices/system/cpu/vulnerabilities/itlb_multihit
497 Date:           January 2018
498 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
499 Description:    Information about CPU vulnerabilities
501                 The files are named after the code names of CPU
502                 vulnerabilities. The output of those files reflects the
503                 state of the CPUs in the system. Possible output values:
505                 "Not affected"    CPU is not affected by the vulnerability
506                 "Vulnerable"      CPU is affected and no mitigation in effect
507                 "Mitigation: $M"  CPU is affected and mitigation $M is in effect
509                 See also: Documentation/admin-guide/hw-vuln/index.rst
511 What:           /sys/devices/system/cpu/smt
512                 /sys/devices/system/cpu/smt/active
513                 /sys/devices/system/cpu/smt/control
514 Date:           June 2018
515 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
516 Description:    Control Symetric Multi Threading (SMT)
518                 active:  Tells whether SMT is active (enabled and siblings online)
520                 control: Read/write interface to control SMT. Possible
521                          values:
523                          "on"             SMT is enabled
524                          "off"            SMT is disabled
525                          "forceoff"       SMT is force disabled. Cannot be changed.
526                          "notsupported"   SMT is not supported by the CPU
527                          "notimplemented" SMT runtime toggling is not
528                                           implemented for the architecture
530                          If control status is "forceoff" or "notsupported" writes
531                          are rejected.
533 What:           /sys/devices/system/cpu/cpu#/power/energy_perf_bias
534 Date:           March 2019
535 Contact:        linux-pm@vger.kernel.org
536 Description:    Intel Energy and Performance Bias Hint (EPB)
538                 EPB for the given CPU in a sliding scale 0 - 15, where a value
539                 of 0 corresponds to a hint preference for highest performance
540                 and a value of 15 corresponds to the maximum energy savings.
542                 In order to change the EPB value for the CPU, write either
543                 a number in the 0 - 15 sliding scale above, or one of the
544                 strings: "performance", "balance-performance", "normal",
545                 "balance-power", "power" (that represent values reflected by
546                 their meaning), to this attribute.
548                 This attribute is present for all online CPUs supporting the
549                 Intel EPB feature.
551 What:           /sys/devices/system/cpu/umwait_control
552                 /sys/devices/system/cpu/umwait_control/enable_c02
553                 /sys/devices/system/cpu/umwait_control/max_time
554 Date:           May 2019
555 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
556 Description:    Umwait control
558                 enable_c02: Read/write interface to control umwait C0.2 state
559                         Read returns C0.2 state status:
560                                 0: C0.2 is disabled
561                                 1: C0.2 is enabled
563                         Write 'y' or '1'  or 'on' to enable C0.2 state.
564                         Write 'n' or '0'  or 'off' to disable C0.2 state.
566                         The interface is case insensitive.
568                 max_time: Read/write interface to control umwait maximum time
569                           in TSC-quanta that the CPU can reside in either C0.1
570                           or C0.2 state. The time is an unsigned 32-bit number.
571                           Note that a value of zero means there is no limit.
572                           Low order two bits must be zero.
574 What:           /sys/devices/system/cpu/svm
575 Date:           August 2019
576 Contact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
577                 Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
578 Description:    Secure Virtual Machine
580                 If 1, it means the system is using the Protected Execution
581                 Facility in POWER9 and newer processors. i.e., it is a Secure
582                 Virtual Machine.