1What:		/sys/devices/system/cpu/
2Date:		pre-git history
3Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4Description:
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
12What:		/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
17Date:		December 2008
18Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
19Description:	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/admin-guide/cputopology.rst for more information.
38
39
40What:		/sys/devices/system/cpu/probe
41		/sys/devices/system/cpu/release
42Date:		November 2009
43Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
44Description:	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
56What:		/sys/devices/system/cpu/cpu#/node
57Date:		October 2009
58Contact:	Linux memory management mailing list <linux-mm@kvack.org>
59Description:	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
70What:		/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
76Date:		December 2008
77Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
78Description:	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/admin-guide/cputopology.rst for more information.
107
108
109What:		/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
113Date:		September 2007
114Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
115Description:	Discover cpuidle policy and mechanism
116
117		Various CPUs today support multiple idle levels that are
118		differentiated by varying exit latencies and power
119		consumption during idle.
120
121		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
133
134		available_governors: (RO) displays a space separated list of
135		available governors
136
137		current_governor: (RW) displays current idle policy. Users can
138		switch the governor at runtime by writing to this file.
139
140		See Documentation/admin-guide/pm/cpuidle.rst and
141		Documentation/driver-api/pm/cpuidle.rst for more information.
142
143
144What:		/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
151Date:		September 2007
152KernelVersion:	v2.6.24
153Contact:	Linux power management list <linux-pm@vger.kernel.org>
154Description:
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:
159
160		name: (RO) Name of the idle state (string).
161
162		latency: (RO) The latency to exit out of this idle state (in
163		microseconds).
164
165		power: (RO) The power consumed while in this idle state (in
166		milliwatts).
167
168		time: (RO) The total time spent in this idle state (in microseconds).
169
170		usage: (RO) Number of times this state was entered (a count).
171
172		above: (RO) Number of times this state was entered, but the
173		       observed CPU idle duration was too short for it (a count).
174
175		below: (RO) Number of times this state was entered, but the
176		       observed CPU idle duration was too long for it (a count).
177
178What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
179Date:		February 2008
180KernelVersion:	v2.6.25
181Contact:	Linux power management list <linux-pm@vger.kernel.org>
182Description:
183		(RO) A small description about the idle state (string).
184
185
186What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
187Date:		March 2012
188KernelVersion:	v3.10
189Contact:	Linux power management list <linux-pm@vger.kernel.org>
190Description:
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.
198
199What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/default_status
200Date:		December 2019
201KernelVersion:	v5.6
202Contact:	Linux power management list <linux-pm@vger.kernel.org>
203Description:
204		(RO) The default status of this state, "enabled" or "disabled".
205
206What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
207Date:		March 2014
208KernelVersion:	v3.15
209Contact:	Linux power management list <linux-pm@vger.kernel.org>
210Description:
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.
214
215What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
216Date:		March 2018
217KernelVersion:	v4.17
218Contact:	Linux power management list <linux-pm@vger.kernel.org>
219Description:
220		Idle state usage statistics related to suspend-to-idle.
221
222		This attribute group is only present for states that can be
223		used in suspend-to-idle with suspended timekeeping.
224
225What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
226Date:		March 2018
227KernelVersion:	v4.17
228Contact:	Linux power management list <linux-pm@vger.kernel.org>
229Description:
230		Total time spent by the CPU in suspend-to-idle (with scheduler
231		tick suspended) after requesting this state.
232
233What:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
234Date:		March 2018
235KernelVersion:	v4.17
236Contact:	Linux power management list <linux-pm@vger.kernel.org>
237Description:
238		Total number of times this state has been requested by the CPU
239		while entering suspend-to-idle.
240
241What:		/sys/devices/system/cpu/cpu#/cpufreq/*
242Date:		pre-git history
243Contact:	linux-pm@vger.kernel.org
244Description:	Discover and change clock speed of CPUs
245
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.
250
251		There are many knobs to tweak in this directory.
252
253		See files in Documentation/cpu-freq/ for more information.
254
255
256What:		/sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
257Date:		June 2013
258Contact:	linux-pm@vger.kernel.org
259Description:	Discover CPUs in the same CPU frequency coordination domain
260
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.
267
268		This file is only present if the acpi-cpufreq driver is in use.
269
270
271What:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
272Date:		August 2008
273KernelVersion:	2.6.27
274Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
275Description:	Disable L3 cache indices
276
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.
285
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
289
290
291What:		/sys/devices/system/cpu/cpufreq/boost
292Date:		August 2012
293Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
294Description:	Processor frequency boosting control
295
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
301
302
303What:		/sys/devices/system/cpu/cpu#/crash_notes
304		/sys/devices/system/cpu/cpu#/crash_notes_size
305Date:		April 2013
306Contact:	kexec@lists.infradead.org
307Description:	address and size of the percpu note.
308
309		crash_notes: the physical address of the memory that holds the
310		note of cpu#.
311
312		crash_notes_size: size of the note of cpu#.
313
314
315What:		/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
318Date:		February 2013
319Contact:	linux-pm@vger.kernel.org
320Description:	Parameters for the Intel P-state driver
321
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.
326
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.
329
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.
332
333		no_turbo: limits the driver to selecting P states below the turbo
334		frequency range.
335
336		More details can be found in
337		Documentation/admin-guide/pm/intel_pstate.rst
338
339What:		/sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
340Date:		July 2014(documented, existed before August 2008)
341Contact:	Sudeep Holla <sudeep.holla@arm.com>
342		Linux kernel mailing list <linux-kernel@vger.kernel.org>
343Description:	Parameters for the CPU cache attributes
344
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
351
352		attributes: LEGACY used only on IA64 and is same as write_policy
353
354		coherency_line_size: the minimum amount of data in bytes that gets
355				     transferred from memory to cache
356
357		level: the cache hierarchy in the multi-level cache configuration
358
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
361
362		physical_line_partition: number of physical cache line per cache tag
363
364		shared_cpu_list: the list of logical cpus sharing the cache
365
366		shared_cpu_map: logical cpu mask containing the list of cpus sharing
367				the cache
368
369		size: the total cache size in kB
370
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
375
376		ways_of_associativity: degree of freedom in placing a particular block
377					of memory in the cache
378
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
385
386
387What:		/sys/devices/system/cpu/cpu*/cache/index*/id
388Date:		September 2016
389Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
390Description:	Cache id
391
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, ...
396
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, ...
401
402What:		/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
411Date:		March 2016
412Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
413		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
414Description:	POWERNV CPUFreq driver's frequency throttle stats directory and
415		attributes
416
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:
421
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.
425
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.
429
430		- unthrottle : This file gives the total number of times the max
431		frequency is unthrottled after being throttled.
432
433		- powercap : This file gives the total number of times the max
434		frequency is throttled due to 'Power Capping'.
435
436		- overtemp : This file gives the total number of times the max
437		frequency is throttled due to 'CPU Over Temperature'.
438
439		- supply_fault : This file gives the total number of times the
440		max frequency is throttled due to 'Power Supply Failure'.
441
442		- overcurrent : This file gives the total number of times the
443		max frequency is throttled due to 'Overcurrent'.
444
445		- occ_reset : This file gives the total number of times the max
446		frequency is throttled due to 'OCC Reset'.
447
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.
451
452What:		/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
461Date:		March 2016
462Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
463		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
464Description:	POWERNV CPUFreq driver's frequency throttle stats directory and
465		attributes
466
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.
470
471What:		/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
475Date:		June 2016
476Contact:	Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
477Description:	AArch64 CPU registers
478		'identification' directory exposes the CPU ID registers for
479		 identifying model and revision of the CPU.
480
481What:		/sys/devices/system/cpu/cpu#/cpu_capacity
482Date:		December 2016
483Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
484Description:	information about CPUs heterogeneity.
485
486		cpu_capacity: capacity of cpu#.
487
488What:		/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
497Date:		January 2018
498Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
499Description:	Information about CPU vulnerabilities
500
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:
504
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
508
509		See also: Documentation/admin-guide/hw-vuln/index.rst
510
511What:		/sys/devices/system/cpu/smt
512		/sys/devices/system/cpu/smt/active
513		/sys/devices/system/cpu/smt/control
514Date:		June 2018
515Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
516Description:	Control Symetric Multi Threading (SMT)
517
518		active:  Tells whether SMT is active (enabled and siblings online)
519
520		control: Read/write interface to control SMT. Possible
521			 values:
522
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
529
530			 If control status is "forceoff" or "notsupported" writes
531			 are rejected.
532
533What:		/sys/devices/system/cpu/cpu#/power/energy_perf_bias
534Date:		March 2019
535Contact:	linux-pm@vger.kernel.org
536Description:	Intel Energy and Performance Bias Hint (EPB)
537
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.
541
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.
547
548		This attribute is present for all online CPUs supporting the
549		Intel EPB feature.
550
551What:		/sys/devices/system/cpu/umwait_control
552		/sys/devices/system/cpu/umwait_control/enable_c02
553		/sys/devices/system/cpu/umwait_control/max_time
554Date:		May 2019
555Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
556Description:	Umwait control
557
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
562
563			Write 'y' or '1'  or 'on' to enable C0.2 state.
564			Write 'n' or '0'  or 'off' to disable C0.2 state.
565
566			The interface is case insensitive.
567
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.
573
574What:		/sys/devices/system/cpu/svm
575Date:		August 2019
576Contact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
577		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
578Description:	Secure Virtual Machine
579
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.
583