hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/Documentation/ABI/testing/sysfs-devices-system-cpu
....@@ -34,7 +34,7 @@
3434 present: cpus that have been identified as being present in
3535 the system.
3636
37
- See Documentation/cputopology.txt for more information.
37
+ See Documentation/admin-guide/cputopology.rst for more information.
3838
3939
4040 What: /sys/devices/system/cpu/probe
....@@ -103,13 +103,13 @@
103103 thread_siblings_list: human-readable list of cpu#'s hardware
104104 threads within the same core as cpu#
105105
106
- See Documentation/cputopology.txt for more information.
106
+ See Documentation/admin-guide/cputopology.rst for more information.
107107
108108
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
109
+What: /sys/devices/system/cpu/cpuidle/available_governors
110
+ /sys/devices/system/cpu/cpuidle/current_driver
112111 /sys/devices/system/cpu/cpuidle/current_governor
112
+ /sys/devices/system/cpu/cpuidle/current_governer_ro
113113 Date: September 2007
114114 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
115115 Description: Discover cpuidle policy and mechanism
....@@ -119,25 +119,20 @@
119119 consumption during idle.
120120
121121 Idle policy (governor) is differentiated from idle mechanism
122
- (driver)
123
-
124
- current_driver: (RO) displays current idle mechanism
125
-
126
- current_governor_ro: (RO) displays current idle policy
127
-
128
- With the cpuidle_sysfs_switch boot option enabled (meant for
129
- developer testing), the following three attributes are visible
130
- instead:
131
-
132
- current_driver: same as described above
122
+ (driver).
133123
134124 available_governors: (RO) displays a space separated list of
135
- available governors
125
+ available governors.
126
+
127
+ current_driver: (RO) displays current idle mechanism.
136128
137129 current_governor: (RW) displays current idle policy. Users can
138130 switch the governor at runtime by writing to this file.
139131
140
- See files in Documentation/cpuidle/ for more information.
132
+ current_governor_ro: (RO) displays current idle policy.
133
+
134
+ See Documentation/admin-guide/pm/cpuidle.rst and
135
+ Documentation/driver-api/pm/cpuidle.rst for more information.
141136
142137
143138 What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
....@@ -145,6 +140,8 @@
145140 /sys/devices/system/cpu/cpuX/cpuidle/stateN/power
146141 /sys/devices/system/cpu/cpuX/cpuidle/stateN/time
147142 /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
143
+ /sys/devices/system/cpu/cpuX/cpuidle/stateN/above
144
+ /sys/devices/system/cpu/cpuX/cpuidle/stateN/below
148145 Date: September 2007
149146 KernelVersion: v2.6.24
150147 Contact: Linux power management list <linux-pm@vger.kernel.org>
....@@ -154,18 +151,28 @@
154151 The processor idle states which are available for use have the
155152 following attributes:
156153
157
- name: (RO) Name of the idle state (string).
154
+ ======== ==== =================================================
155
+ name: (RO) Name of the idle state (string).
158156
159157 latency: (RO) The latency to exit out of this idle state (in
160
- microseconds).
158
+ microseconds).
161159
162
- power: (RO) The power consumed while in this idle state (in
163
- milliwatts).
160
+ power: (RO) The power consumed while in this idle state (in
161
+ milliwatts).
164162
165
- time: (RO) The total time spent in this idle state (in microseconds).
163
+ time: (RO) The total time spent in this idle state
164
+ (in microseconds).
166165
167
- usage: (RO) Number of times this state was entered (a count).
166
+ usage: (RO) Number of times this state was entered (a count).
168167
168
+ above: (RO) Number of times this state was entered, but the
169
+ observed CPU idle duration was too short for it
170
+ (a count).
171
+
172
+ below: (RO) Number of times this state was entered, but the
173
+ observed CPU idle duration was too long for it
174
+ (a count).
175
+ ======== ==== =================================================
169176
170177 What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
171178 Date: February 2008
....@@ -188,6 +195,12 @@
188195 does not reflect it. Likewise, if one enables a deep state but a
189196 lighter state still is disabled, then this has no effect.
190197
198
+What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/default_status
199
+Date: December 2019
200
+KernelVersion: v5.6
201
+Contact: Linux power management list <linux-pm@vger.kernel.org>
202
+Description:
203
+ (RO) The default status of this state, "enabled" or "disabled".
191204
192205 What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
193206 Date: March 2014
....@@ -282,6 +295,7 @@
282295 This switch controls the boost setting for the whole system.
283296 Boosting allows the CPU and the firmware to run at a frequency
284297 beyound it's nominal limit.
298
+
285299 More details can be found in
286300 Documentation/admin-guide/pm/cpufreq.rst
287301
....@@ -329,43 +343,57 @@
329343 Description: Parameters for the CPU cache attributes
330344
331345 allocation_policy:
332
- - WriteAllocate: allocate a memory location to a cache line
333
- on a cache miss because of a write
334
- - ReadAllocate: allocate a memory location to a cache line
346
+ - WriteAllocate:
347
+ allocate a memory location to a cache line
348
+ on a cache miss because of a write
349
+ - ReadAllocate:
350
+ allocate a memory location to a cache line
335351 on a cache miss because of a read
336
- - ReadWriteAllocate: both writeallocate and readallocate
352
+ - ReadWriteAllocate:
353
+ both writeallocate and readallocate
337354
338
- attributes: LEGACY used only on IA64 and is same as write_policy
355
+ attributes:
356
+ LEGACY used only on IA64 and is same as write_policy
339357
340
- coherency_line_size: the minimum amount of data in bytes that gets
358
+ coherency_line_size:
359
+ the minimum amount of data in bytes that gets
341360 transferred from memory to cache
342361
343
- level: the cache hierarchy in the multi-level cache configuration
362
+ level:
363
+ the cache hierarchy in the multi-level cache configuration
344364
345
- number_of_sets: total number of sets in the cache, a set is a
365
+ number_of_sets:
366
+ total number of sets in the cache, a set is a
346367 collection of cache lines with the same cache index
347368
348
- physical_line_partition: number of physical cache line per cache tag
369
+ physical_line_partition:
370
+ number of physical cache line per cache tag
349371
350
- shared_cpu_list: the list of logical cpus sharing the cache
372
+ shared_cpu_list:
373
+ the list of logical cpus sharing the cache
351374
352
- shared_cpu_map: logical cpu mask containing the list of cpus sharing
375
+ shared_cpu_map:
376
+ logical cpu mask containing the list of cpus sharing
353377 the cache
354378
355
- size: the total cache size in kB
379
+ size:
380
+ the total cache size in kB
356381
357382 type:
358383 - Instruction: cache that only holds instructions
359384 - Data: cache that only caches data
360385 - Unified: cache that holds both data and instructions
361386
362
- ways_of_associativity: degree of freedom in placing a particular block
363
- of memory in the cache
387
+ ways_of_associativity:
388
+ degree of freedom in placing a particular block
389
+ of memory in the cache
364390
365391 write_policy:
366
- - WriteThrough: data is written to both the cache line
392
+ - WriteThrough:
393
+ data is written to both the cache line
367394 and to the block in the lower-level memory
368
- - WriteBack: data is written only to the cache line and
395
+ - WriteBack:
396
+ data is written only to the cache line and
369397 the modified cache line is written to main
370398 memory only when it is replaced
371399
....@@ -406,30 +434,30 @@
406434 throttle attributes exported in the 'throttle_stats' directory:
407435
408436 - turbo_stat : This file gives the total number of times the max
409
- frequency is throttled to lower frequency in turbo (at and above
410
- nominal frequency) range of frequencies.
437
+ frequency is throttled to lower frequency in turbo (at and above
438
+ nominal frequency) range of frequencies.
411439
412440 - sub_turbo_stat : This file gives the total number of times the
413
- max frequency is throttled to lower frequency in sub-turbo(below
414
- nominal frequency) range of frequencies.
441
+ max frequency is throttled to lower frequency in sub-turbo(below
442
+ nominal frequency) range of frequencies.
415443
416444 - unthrottle : This file gives the total number of times the max
417
- frequency is unthrottled after being throttled.
445
+ frequency is unthrottled after being throttled.
418446
419447 - powercap : This file gives the total number of times the max
420
- frequency is throttled due to 'Power Capping'.
448
+ frequency is throttled due to 'Power Capping'.
421449
422450 - overtemp : This file gives the total number of times the max
423
- frequency is throttled due to 'CPU Over Temperature'.
451
+ frequency is throttled due to 'CPU Over Temperature'.
424452
425453 - supply_fault : This file gives the total number of times the
426
- max frequency is throttled due to 'Power Supply Failure'.
454
+ max frequency is throttled due to 'Power Supply Failure'.
427455
428456 - overcurrent : This file gives the total number of times the
429
- max frequency is throttled due to 'Overcurrent'.
457
+ max frequency is throttled due to 'Overcurrent'.
430458
431459 - occ_reset : This file gives the total number of times the max
432
- frequency is throttled due to 'OCC Reset'.
460
+ frequency is throttled due to 'OCC Reset'.
433461
434462 The sysfs attributes representing different throttle reasons like
435463 powercap, overtemp, supply_fault, overcurrent and occ_reset map to
....@@ -461,8 +489,18 @@
461489 Date: June 2016
462490 Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
463491 Description: AArch64 CPU registers
492
+
464493 'identification' directory exposes the CPU ID registers for
465
- identifying model and revision of the CPU.
494
+ identifying model and revision of the CPU.
495
+
496
+What: /sys/devices/system/cpu/aarch32_el0
497
+Date: November 2020
498
+Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
499
+Description: Identifies the subset of CPUs in the system that can execute
500
+ AArch32 (32-bit ARM) applications. If present, the same format as
501
+ /sys/devices/system/cpu/{offline,online,possible,present} is used.
502
+ If absent, then all or none of the CPUs can execute AArch32
503
+ applications and execve() will behave accordingly.
466504
467505 What: /sys/devices/system/cpu/cpu#/cpu_capacity
468506 Date: December 2016
....@@ -481,6 +519,8 @@
481519 /sys/devices/system/cpu/vulnerabilities/srbds
482520 /sys/devices/system/cpu/vulnerabilities/tsx_async_abort
483521 /sys/devices/system/cpu/vulnerabilities/itlb_multihit
522
+ /sys/devices/system/cpu/vulnerabilities/mmio_stale_data
523
+ /sys/devices/system/cpu/vulnerabilities/retbleed
484524 Date: January 2018
485525 Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
486526 Description: Information about CPU vulnerabilities
....@@ -489,9 +529,11 @@
489529 vulnerabilities. The output of those files reflects the
490530 state of the CPUs in the system. Possible output values:
491531
532
+ ================ ==============================================
492533 "Not affected" CPU is not affected by the vulnerability
493534 "Vulnerable" CPU is affected and no mitigation in effect
494535 "Mitigation: $M" CPU is affected and mitigation $M is in effect
536
+ ================ ==============================================
495537
496538 See also: Documentation/admin-guide/hw-vuln/index.rst
497539
....@@ -507,10 +549,122 @@
507549 control: Read/write interface to control SMT. Possible
508550 values:
509551
510
- "on" SMT is enabled
511
- "off" SMT is disabled
512
- "forceoff" SMT is force disabled. Cannot be changed.
513
- "notsupported" SMT is not supported by the CPU
552
+ ================ =========================================
553
+ "on" SMT is enabled
554
+ "off" SMT is disabled
555
+ "forceoff" SMT is force disabled. Cannot be changed.
556
+ "notsupported" SMT is not supported by the CPU
557
+ "notimplemented" SMT runtime toggling is not
558
+ implemented for the architecture
559
+ ================ =========================================
514560
515561 If control status is "forceoff" or "notsupported" writes
516562 are rejected.
563
+
564
+What: /sys/devices/system/cpu/cpu#/power/energy_perf_bias
565
+Date: March 2019
566
+Contact: linux-pm@vger.kernel.org
567
+Description: Intel Energy and Performance Bias Hint (EPB)
568
+
569
+ EPB for the given CPU in a sliding scale 0 - 15, where a value
570
+ of 0 corresponds to a hint preference for highest performance
571
+ and a value of 15 corresponds to the maximum energy savings.
572
+
573
+ In order to change the EPB value for the CPU, write either
574
+ a number in the 0 - 15 sliding scale above, or one of the
575
+ strings: "performance", "balance-performance", "normal",
576
+ "balance-power", "power" (that represent values reflected by
577
+ their meaning), to this attribute.
578
+
579
+ This attribute is present for all online CPUs supporting the
580
+ Intel EPB feature.
581
+
582
+What: /sys/devices/system/cpu/umwait_control
583
+ /sys/devices/system/cpu/umwait_control/enable_c02
584
+ /sys/devices/system/cpu/umwait_control/max_time
585
+Date: May 2019
586
+Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
587
+Description: Umwait control
588
+
589
+ enable_c02: Read/write interface to control umwait C0.2 state
590
+ Read returns C0.2 state status:
591
+ 0: C0.2 is disabled
592
+ 1: C0.2 is enabled
593
+
594
+ Write 'y' or '1' or 'on' to enable C0.2 state.
595
+ Write 'n' or '0' or 'off' to disable C0.2 state.
596
+
597
+ The interface is case insensitive.
598
+
599
+ max_time: Read/write interface to control umwait maximum time
600
+ in TSC-quanta that the CPU can reside in either C0.1
601
+ or C0.2 state. The time is an unsigned 32-bit number.
602
+ Note that a value of zero means there is no limit.
603
+ Low order two bits must be zero.
604
+
605
+What: /sys/devices/system/cpu/svm
606
+Date: August 2019
607
+Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
608
+ Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
609
+Description: Secure Virtual Machine
610
+
611
+ If 1, it means the system is using the Protected Execution
612
+ Facility in POWER9 and newer processors. i.e., it is a Secure
613
+ Virtual Machine.
614
+
615
+What: /sys/devices/system/cpu/cpuX/purr
616
+Date: Apr 2005
617
+Contact: Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
618
+Description: PURR ticks for this CPU since the system boot.
619
+
620
+ The Processor Utilization Resources Register (PURR) is
621
+ a 64-bit counter which provides an estimate of the
622
+ resources used by the CPU thread. The contents of this
623
+ register increases monotonically. This sysfs interface
624
+ exposes the number of PURR ticks for cpuX.
625
+
626
+What: /sys/devices/system/cpu/cpuX/spurr
627
+Date: Dec 2006
628
+Contact: Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
629
+Description: SPURR ticks for this CPU since the system boot.
630
+
631
+ The Scaled Processor Utilization Resources Register
632
+ (SPURR) is a 64-bit counter that provides a frequency
633
+ invariant estimate of the resources used by the CPU
634
+ thread. The contents of this register increases
635
+ monotonically. This sysfs interface exposes the number
636
+ of SPURR ticks for cpuX.
637
+
638
+What: /sys/devices/system/cpu/cpuX/idle_purr
639
+Date: Apr 2020
640
+Contact: Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
641
+Description: PURR ticks for cpuX when it was idle.
642
+
643
+ This sysfs interface exposes the number of PURR ticks
644
+ for cpuX when it was idle.
645
+
646
+What: /sys/devices/system/cpu/cpuX/idle_spurr
647
+Date: Apr 2020
648
+Contact: Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
649
+Description: SPURR ticks for cpuX when it was idle.
650
+
651
+ This sysfs interface exposes the number of SPURR ticks
652
+ for cpuX when it was idle.
653
+
654
+What: /sys/devices/system/cpu/cpuX/mte_tcf_preferred
655
+Date: July 2021
656
+Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
657
+Description: Preferred MTE tag checking mode
658
+
659
+ When a user program specifies more than one MTE tag checking
660
+ mode, this sysfs node is used to specify which mode should
661
+ be preferred when running on that CPU. Possible values:
662
+
663
+ ================ ==============================================
664
+ "sync" Prefer synchronous mode
665
+ "async" Prefer asynchronous mode
666
+ ================ ==============================================
667
+
668
+ Changes to this sysfs node may not take effect immediately.
669
+
670
+ See also: Documentation/arm64/memory-tagging-extension.rst