xref: /linux/Documentation/ABI/testing/sysfs-devices-system-cpu (revision 34433332841de2787f903fcf7de8dc3e06780f4a)
12ceb3fb0SAlex ChiangWhat:		/sys/devices/system/cpu/
22ceb3fb0SAlex ChiangDate:		pre-git history
32ceb3fb0SAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
42ceb3fb0SAlex ChiangDescription:
52ceb3fb0SAlex Chiang		A collection of both global and individual CPU attributes
62ceb3fb0SAlex Chiang
72ceb3fb0SAlex Chiang		Individual CPU attributes are contained in subdirectories
82ceb3fb0SAlex Chiang		named by the kernel's logical CPU number, e.g.:
92ceb3fb0SAlex Chiang
102ceb3fb0SAlex Chiang		/sys/devices/system/cpu/cpu#/
112ceb3fb0SAlex Chiang
12d93fc863SAlex ChiangWhat:		/sys/devices/system/cpu/kernel_max
13d93fc863SAlex Chiang		/sys/devices/system/cpu/offline
14d93fc863SAlex Chiang		/sys/devices/system/cpu/online
15d93fc863SAlex Chiang		/sys/devices/system/cpu/possible
16d93fc863SAlex Chiang		/sys/devices/system/cpu/present
17d93fc863SAlex ChiangDate:		December 2008
18d93fc863SAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
19d93fc863SAlex ChiangDescription:	CPU topology files that describe kernel limits related to
20d93fc863SAlex Chiang		hotplug. Briefly:
21d93fc863SAlex Chiang
22d93fc863SAlex Chiang		kernel_max: the maximum cpu index allowed by the kernel
23d93fc863SAlex Chiang		configuration.
24d93fc863SAlex Chiang
25d93fc863SAlex Chiang		offline: cpus that are not online because they have been
26d93fc863SAlex Chiang		HOTPLUGGED off or exceed the limit of cpus allowed by the
27d93fc863SAlex Chiang		kernel configuration (kernel_max above).
28d93fc863SAlex Chiang
29d93fc863SAlex Chiang		online: cpus that are online and being scheduled.
30d93fc863SAlex Chiang
31d93fc863SAlex Chiang		possible: cpus that have been allocated resources and can be
32d93fc863SAlex Chiang		brought online if they are present.
33d93fc863SAlex Chiang
34d93fc863SAlex Chiang		present: cpus that have been identified as being present in
35d93fc863SAlex Chiang		the system.
36d93fc863SAlex Chiang
374f4cfa6cSMauro Carvalho Chehab		See Documentation/admin-guide/cputopology.rst for more information.
38d93fc863SAlex Chiang
39d93fc863SAlex Chiang
4012633e80SNathan FontenotWhat:		/sys/devices/system/cpu/probe
4112633e80SNathan Fontenot		/sys/devices/system/cpu/release
4212633e80SNathan FontenotDate:		November 2009
4312633e80SNathan FontenotContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4412633e80SNathan FontenotDescription:	Dynamic addition and removal of CPU's.  This is not hotplug
4512633e80SNathan Fontenot		removal, this is meant complete removal/addition of the CPU
4612633e80SNathan Fontenot		from the system.
4712633e80SNathan Fontenot
4812633e80SNathan Fontenot		probe: writes to this file will dynamically add a CPU to the
4912633e80SNathan Fontenot		system.  Information written to the file to add CPU's is
5012633e80SNathan Fontenot		architecture specific.
5112633e80SNathan Fontenot
5212633e80SNathan Fontenot		release: writes to this file dynamically remove a CPU from
5312633e80SNathan Fontenot		the system.  Information writtento the file to remove CPU's
5412633e80SNathan Fontenot		is architecture specific.
55657348a0SAlex Chiang
56657348a0SAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/node
57657348a0SAlex ChiangDate:		October 2009
58657348a0SAlex ChiangContact:	Linux memory management mailing list <linux-mm@kvack.org>
59657348a0SAlex ChiangDescription:	Discover NUMA node a CPU belongs to
60657348a0SAlex Chiang
61657348a0SAlex Chiang		When CONFIG_NUMA is enabled, a symbolic link that points
62657348a0SAlex Chiang		to the corresponding NUMA node directory.
63657348a0SAlex Chiang
64657348a0SAlex Chiang		For example, the following symlink is created for cpu42
65657348a0SAlex Chiang		in NUMA node 2:
66657348a0SAlex Chiang
67657348a0SAlex Chiang		/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
68657348a0SAlex Chiang
69657348a0SAlex Chiang
70663fb2fcSAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/topology/core_id
71663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/core_siblings
72663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/core_siblings_list
73663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/physical_package_id
74663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/thread_siblings
75663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/thread_siblings_list
76663fb2fcSAlex ChiangDate:		December 2008
77663fb2fcSAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
78663fb2fcSAlex ChiangDescription:	CPU topology files that describe a logical CPU's relationship
79663fb2fcSAlex Chiang		to other cores and threads in the same physical package.
80663fb2fcSAlex Chiang
81663fb2fcSAlex Chiang		One cpu# directory is created per logical CPU in the system,
82663fb2fcSAlex Chiang		e.g. /sys/devices/system/cpu/cpu42/.
83663fb2fcSAlex Chiang
84663fb2fcSAlex Chiang		Briefly, the files above are:
85663fb2fcSAlex Chiang
86663fb2fcSAlex Chiang		core_id: the CPU core ID of cpu#. Typically it is the
87663fb2fcSAlex Chiang		hardware platform's identifier (rather than the kernel's).
88663fb2fcSAlex Chiang		The actual value is architecture and platform dependent.
89663fb2fcSAlex Chiang
90663fb2fcSAlex Chiang		core_siblings: internal kernel map of cpu#'s hardware threads
91663fb2fcSAlex Chiang		within the same physical_package_id.
92663fb2fcSAlex Chiang
93663fb2fcSAlex Chiang		core_siblings_list: human-readable list of the logical CPU
94663fb2fcSAlex Chiang		numbers within the same physical_package_id as cpu#.
95663fb2fcSAlex Chiang
96663fb2fcSAlex Chiang		physical_package_id: physical package id of cpu#. Typically
97663fb2fcSAlex Chiang		corresponds to a physical socket number, but the actual value
98663fb2fcSAlex Chiang		is architecture and platform dependent.
99663fb2fcSAlex Chiang
100663fb2fcSAlex Chiang		thread_siblings: internel kernel map of cpu#'s hardware
101663fb2fcSAlex Chiang		threads within the same core as cpu#
102663fb2fcSAlex Chiang
103663fb2fcSAlex Chiang		thread_siblings_list: human-readable list of cpu#'s hardware
104663fb2fcSAlex Chiang		threads within the same core as cpu#
105663fb2fcSAlex Chiang
1064f4cfa6cSMauro Carvalho Chehab		See Documentation/admin-guide/cputopology.rst for more information.
107663fb2fcSAlex Chiang
108663fb2fcSAlex Chiang
1097395683aSHanjun GuoWhat:		/sys/devices/system/cpu/cpuidle/available_governors
1107395683aSHanjun Guo		/sys/devices/system/cpu/cpuidle/current_driver
111b6d8ef86SAishwarya Pant		/sys/devices/system/cpu/cpuidle/current_governor
1127395683aSHanjun Guo		/sys/devices/system/cpu/cpuidle/current_governer_ro
113c1fb5c47SAlex ChiangDate:		September 2007
114c1fb5c47SAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
115c1fb5c47SAlex ChiangDescription:	Discover cpuidle policy and mechanism
116c1fb5c47SAlex Chiang
117c1fb5c47SAlex Chiang		Various CPUs today support multiple idle levels that are
118c1fb5c47SAlex Chiang		differentiated by varying exit latencies and power
119c1fb5c47SAlex Chiang		consumption during idle.
120c1fb5c47SAlex Chiang
121c1fb5c47SAlex Chiang		Idle policy (governor) is differentiated from idle mechanism
1227395683aSHanjun Guo		(driver).
123b6d8ef86SAishwarya Pant
124b6d8ef86SAishwarya Pant		available_governors: (RO) displays a space separated list of
1257395683aSHanjun Guo		available governors.
1267395683aSHanjun Guo
1277395683aSHanjun Guo		current_driver: (RO) displays current idle mechanism.
128b6d8ef86SAishwarya Pant
129b6d8ef86SAishwarya Pant		current_governor: (RW) displays current idle policy. Users can
130b6d8ef86SAishwarya Pant		switch the governor at runtime by writing to this file.
131c1fb5c47SAlex Chiang
1327395683aSHanjun Guo		current_governor_ro: (RO) displays current idle policy.
1337395683aSHanjun Guo
134671c3095SMauro Carvalho Chehab		See Documentation/admin-guide/pm/cpuidle.rst and
135671c3095SMauro Carvalho Chehab		Documentation/driver-api/pm/cpuidle.rst for more information.
136c1fb5c47SAlex Chiang
137c1fb5c47SAlex Chiang
138b6d8ef86SAishwarya PantWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/name
139b6d8ef86SAishwarya Pant		/sys/devices/system/cpu/cpuX/cpuidle/stateN/latency
140b6d8ef86SAishwarya Pant		/sys/devices/system/cpu/cpuX/cpuidle/stateN/power
141b6d8ef86SAishwarya Pant		/sys/devices/system/cpu/cpuX/cpuidle/stateN/time
142b6d8ef86SAishwarya Pant		/sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
14304dab58aSRafael J. Wysocki		/sys/devices/system/cpu/cpuX/cpuidle/stateN/above
14404dab58aSRafael J. Wysocki		/sys/devices/system/cpu/cpuX/cpuidle/stateN/below
145b6d8ef86SAishwarya PantDate:		September 2007
146b6d8ef86SAishwarya PantKernelVersion:	v2.6.24
147b6d8ef86SAishwarya PantContact:	Linux power management list <linux-pm@vger.kernel.org>
148b6d8ef86SAishwarya PantDescription:
149b6d8ef86SAishwarya Pant		The directory /sys/devices/system/cpu/cpuX/cpuidle contains per
150b6d8ef86SAishwarya Pant		logical CPU specific cpuidle information for each online cpu X.
151b6d8ef86SAishwarya Pant		The processor idle states which are available for use have the
152b6d8ef86SAishwarya Pant		following attributes:
153b6d8ef86SAishwarya Pant
154*34433332SMauro Carvalho Chehab		======== ==== =================================================
155b6d8ef86SAishwarya Pant		name:	 (RO) Name of the idle state (string).
156b6d8ef86SAishwarya Pant
157b6d8ef86SAishwarya Pant		latency: (RO) The latency to exit out of this idle state (in
158b6d8ef86SAishwarya Pant			      microseconds).
159b6d8ef86SAishwarya Pant
160b6d8ef86SAishwarya Pant		power:   (RO) The power consumed while in this idle state (in
161b6d8ef86SAishwarya Pant			      milliwatts).
162b6d8ef86SAishwarya Pant
163*34433332SMauro Carvalho Chehab		time:    (RO) The total time spent in this idle state
164*34433332SMauro Carvalho Chehab			      (in microseconds).
165b6d8ef86SAishwarya Pant
166b6d8ef86SAishwarya Pant		usage:	 (RO) Number of times this state was entered (a count).
167b6d8ef86SAishwarya Pant
16804dab58aSRafael J. Wysocki		above:	 (RO) Number of times this state was entered, but the
169*34433332SMauro Carvalho Chehab			      observed CPU idle duration was too short for it
170*34433332SMauro Carvalho Chehab			      (a count).
17104dab58aSRafael J. Wysocki
17204dab58aSRafael J. Wysocki		below: 	 (RO) Number of times this state was entered, but the
173*34433332SMauro Carvalho Chehab			      observed CPU idle duration was too long for it
174*34433332SMauro Carvalho Chehab			      (a count).
175*34433332SMauro Carvalho Chehab		======== ==== =================================================
176b6d8ef86SAishwarya Pant
177b6d8ef86SAishwarya PantWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
178b6d8ef86SAishwarya PantDate:		February 2008
179b6d8ef86SAishwarya PantKernelVersion:	v2.6.25
180b6d8ef86SAishwarya PantContact:	Linux power management list <linux-pm@vger.kernel.org>
181b6d8ef86SAishwarya PantDescription:
182b6d8ef86SAishwarya Pant		(RO) A small description about the idle state (string).
183b6d8ef86SAishwarya Pant
184b6d8ef86SAishwarya Pant
185b6d8ef86SAishwarya PantWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
186b6d8ef86SAishwarya PantDate:		March 2012
187b6d8ef86SAishwarya PantKernelVersion:	v3.10
188b6d8ef86SAishwarya PantContact:	Linux power management list <linux-pm@vger.kernel.org>
189b6d8ef86SAishwarya PantDescription:
190b6d8ef86SAishwarya Pant		(RW) Option to disable this idle state (bool). The behavior and
191b6d8ef86SAishwarya Pant		the effect of the disable variable depends on the implementation
192b6d8ef86SAishwarya Pant		of a particular governor. In the ladder governor, for example,
193b6d8ef86SAishwarya Pant		it is not coherent, i.e. if one is disabling a light state, then
194b6d8ef86SAishwarya Pant		all deeper states are disabled as well, but the disable variable
195b6d8ef86SAishwarya Pant		does not reflect it. Likewise, if one enables a deep state but a
196b6d8ef86SAishwarya Pant		lighter state still is disabled, then this has no effect.
197b6d8ef86SAishwarya Pant
19875a80267SRafael J. WysockiWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/default_status
19975a80267SRafael J. WysockiDate:		December 2019
20075a80267SRafael J. WysockiKernelVersion:	v5.6
20175a80267SRafael J. WysockiContact:	Linux power management list <linux-pm@vger.kernel.org>
20275a80267SRafael J. WysockiDescription:
20375a80267SRafael J. Wysocki		(RO) The default status of this state, "enabled" or "disabled".
204b6d8ef86SAishwarya Pant
205b6d8ef86SAishwarya PantWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
206b6d8ef86SAishwarya PantDate:		March 2014
207b6d8ef86SAishwarya PantKernelVersion:	v3.15
208b6d8ef86SAishwarya PantContact:	Linux power management list <linux-pm@vger.kernel.org>
209b6d8ef86SAishwarya PantDescription:
210b6d8ef86SAishwarya Pant		(RO) Display the target residency i.e. the minimum amount of
211b6d8ef86SAishwarya Pant		time (in microseconds) this cpu should spend in this idle state
212b6d8ef86SAishwarya Pant		to make the transition worth the effort.
213b6d8ef86SAishwarya Pant
21464bdff69SRafael J. WysockiWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
21564bdff69SRafael J. WysockiDate:		March 2018
21664bdff69SRafael J. WysockiKernelVersion:	v4.17
21764bdff69SRafael J. WysockiContact:	Linux power management list <linux-pm@vger.kernel.org>
21864bdff69SRafael J. WysockiDescription:
21964bdff69SRafael J. Wysocki		Idle state usage statistics related to suspend-to-idle.
22064bdff69SRafael J. Wysocki
22164bdff69SRafael J. Wysocki		This attribute group is only present for states that can be
22264bdff69SRafael J. Wysocki		used in suspend-to-idle with suspended timekeeping.
22364bdff69SRafael J. Wysocki
22464bdff69SRafael J. WysockiWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
22564bdff69SRafael J. WysockiDate:		March 2018
22664bdff69SRafael J. WysockiKernelVersion:	v4.17
22764bdff69SRafael J. WysockiContact:	Linux power management list <linux-pm@vger.kernel.org>
22864bdff69SRafael J. WysockiDescription:
22964bdff69SRafael J. Wysocki		Total time spent by the CPU in suspend-to-idle (with scheduler
23064bdff69SRafael J. Wysocki		tick suspended) after requesting this state.
23164bdff69SRafael J. Wysocki
23264bdff69SRafael J. WysockiWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
23364bdff69SRafael J. WysockiDate:		March 2018
23464bdff69SRafael J. WysockiKernelVersion:	v4.17
23564bdff69SRafael J. WysockiContact:	Linux power management list <linux-pm@vger.kernel.org>
23664bdff69SRafael J. WysockiDescription:
23764bdff69SRafael J. Wysocki		Total number of times this state has been requested by the CPU
23864bdff69SRafael J. Wysocki		while entering suspend-to-idle.
239b6d8ef86SAishwarya Pant
2400cda8b91SAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/cpufreq/*
2410cda8b91SAlex ChiangDate:		pre-git history
242dec102aaSViresh KumarContact:	linux-pm@vger.kernel.org
2430cda8b91SAlex ChiangDescription:	Discover and change clock speed of CPUs
2440cda8b91SAlex Chiang
2450cda8b91SAlex Chiang		Clock scaling allows you to change the clock speed of the
2460cda8b91SAlex Chiang		CPUs on the fly. This is a nice method to save battery
2470cda8b91SAlex Chiang		power, because the lower the clock speed, the less power
2480cda8b91SAlex Chiang		the CPU consumes.
2490cda8b91SAlex Chiang
2500cda8b91SAlex Chiang		There are many knobs to tweak in this directory.
2510cda8b91SAlex Chiang
2520cda8b91SAlex Chiang		See files in Documentation/cpu-freq/ for more information.
2530cda8b91SAlex Chiang
2540cda8b91SAlex Chiang
255f4fd3797SLan TianyuWhat:		/sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
256f4fd3797SLan TianyuDate:		June 2013
257dec102aaSViresh KumarContact:	linux-pm@vger.kernel.org
258f4fd3797SLan TianyuDescription:	Discover CPUs in the same CPU frequency coordination domain
259f4fd3797SLan Tianyu
260f4fd3797SLan Tianyu		freqdomain_cpus is the list of CPUs (online+offline) that share
261f4fd3797SLan Tianyu		the same clock/freq domain (possibly at the hardware level).
262f4fd3797SLan Tianyu		That information may be hidden from the cpufreq core and the
263f4fd3797SLan Tianyu		value of related_cpus may be different from freqdomain_cpus. This
264f4fd3797SLan Tianyu		attribute is useful for user space DVFS controllers to get better
265f4fd3797SLan Tianyu		power/performance results for platforms using acpi-cpufreq.
266f4fd3797SLan Tianyu
267f4fd3797SLan Tianyu		This file is only present if the acpi-cpufreq driver is in use.
268f4fd3797SLan Tianyu
269f4fd3797SLan Tianyu
270eecaaba5SBorislav PetkovWhat:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
271468727abSAlex ChiangDate:		August 2008
272468727abSAlex ChiangKernelVersion:	2.6.27
273ea8e080bSAravind GopalakrishnanContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
274eecaaba5SBorislav PetkovDescription:	Disable L3 cache indices
275468727abSAlex Chiang
276eecaaba5SBorislav Petkov		These files exist in every CPU's cache/index3 directory. Each
277eecaaba5SBorislav Petkov		cache_disable_{0,1} file corresponds to one disable slot which
278eecaaba5SBorislav Petkov		can be used to disable a cache index. Reading from these files
279eecaaba5SBorislav Petkov		on a processor with this functionality will return the currently
280eecaaba5SBorislav Petkov		disabled index for that node. There is one L3 structure per
281eecaaba5SBorislav Petkov		node, or per internal node on MCM machines. Writing a valid
282eecaaba5SBorislav Petkov		index to one of these files will cause the specificed cache
283eecaaba5SBorislav Petkov		index to be disabled.
284eecaaba5SBorislav Petkov
285eecaaba5SBorislav Petkov		All AMD processors with L3 caches provide this functionality.
286eecaaba5SBorislav Petkov		For details, see BKDGs at
287eecaaba5SBorislav Petkov		http://developer.amd.com/documentation/guides/Pages/default.aspx
288615b7300SAndre Przywara
289615b7300SAndre Przywara
290615b7300SAndre PrzywaraWhat:		/sys/devices/system/cpu/cpufreq/boost
291615b7300SAndre PrzywaraDate:		August 2012
292615b7300SAndre PrzywaraContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
293615b7300SAndre PrzywaraDescription:	Processor frequency boosting control
294615b7300SAndre Przywara
295615b7300SAndre Przywara		This switch controls the boost setting for the whole system.
296615b7300SAndre Przywara		Boosting allows the CPU and the firmware to run at a frequency
297615b7300SAndre Przywara		beyound it's nominal limit.
298*34433332SMauro Carvalho Chehab
2993ba9b1b8STom Saeger		More details can be found in
3003ba9b1b8STom Saeger		Documentation/admin-guide/pm/cpufreq.rst
301c4fd675fSZhang Yanfei
302c4fd675fSZhang Yanfei
303c4fd675fSZhang YanfeiWhat:		/sys/devices/system/cpu/cpu#/crash_notes
304c4fd675fSZhang Yanfei		/sys/devices/system/cpu/cpu#/crash_notes_size
305c4fd675fSZhang YanfeiDate:		April 2013
306c4fd675fSZhang YanfeiContact:	kexec@lists.infradead.org
307c4fd675fSZhang YanfeiDescription:	address and size of the percpu note.
308c4fd675fSZhang Yanfei
309c4fd675fSZhang Yanfei		crash_notes: the physical address of the memory that holds the
310c4fd675fSZhang Yanfei		note of cpu#.
311c4fd675fSZhang Yanfei
312c4fd675fSZhang Yanfei		crash_notes_size: size of the note of cpu#.
313fbe299e0SRamkumar Ramachandra
314fbe299e0SRamkumar Ramachandra
315fbe299e0SRamkumar RamachandraWhat:		/sys/devices/system/cpu/intel_pstate/max_perf_pct
316fbe299e0SRamkumar Ramachandra		/sys/devices/system/cpu/intel_pstate/min_perf_pct
317fbe299e0SRamkumar Ramachandra		/sys/devices/system/cpu/intel_pstate/no_turbo
318fbe299e0SRamkumar RamachandraDate:		February 2013
319fbe299e0SRamkumar RamachandraContact:	linux-pm@vger.kernel.org
320fbe299e0SRamkumar RamachandraDescription:	Parameters for the Intel P-state driver
321fbe299e0SRamkumar Ramachandra
322fbe299e0SRamkumar Ramachandra		Logic for selecting the current P-state in Intel
323fbe299e0SRamkumar Ramachandra		Sandybridge+ processors. The three knobs control
324fbe299e0SRamkumar Ramachandra		limits for the P-state that will be requested by the
325fbe299e0SRamkumar Ramachandra		driver.
326fbe299e0SRamkumar Ramachandra
327fbe299e0SRamkumar Ramachandra		max_perf_pct: limits the maximum P state that will be requested by
328fbe299e0SRamkumar Ramachandra		the driver stated as a percentage of the available performance.
329fbe299e0SRamkumar Ramachandra
330fbe299e0SRamkumar Ramachandra		min_perf_pct: limits the minimum P state that will be requested by
331fbe299e0SRamkumar Ramachandra		the driver stated as a percentage of the available performance.
332fbe299e0SRamkumar Ramachandra
333fbe299e0SRamkumar Ramachandra		no_turbo: limits the driver to selecting P states below the turbo
334fbe299e0SRamkumar Ramachandra		frequency range.
335fbe299e0SRamkumar Ramachandra
3363ba9b1b8STom Saeger		More details can be found in
3373ba9b1b8STom Saeger		Documentation/admin-guide/pm/intel_pstate.rst
338246246cbSSudeep Holla
339246246cbSSudeep HollaWhat:		/sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
340246246cbSSudeep HollaDate:		July 2014(documented, existed before August 2008)
341246246cbSSudeep HollaContact:	Sudeep Holla <sudeep.holla@arm.com>
342246246cbSSudeep Holla		Linux kernel mailing list <linux-kernel@vger.kernel.org>
343246246cbSSudeep HollaDescription:	Parameters for the CPU cache attributes
344246246cbSSudeep Holla
345246246cbSSudeep Holla		allocation_policy:
346*34433332SMauro Carvalho Chehab			- WriteAllocate:
347*34433332SMauro Carvalho Chehab					allocate a memory location to a cache line
348246246cbSSudeep Holla					on a cache miss because of a write
349*34433332SMauro Carvalho Chehab			- ReadAllocate:
350*34433332SMauro Carvalho Chehab					allocate a memory location to a cache line
351246246cbSSudeep Holla					on a cache miss because of a read
352*34433332SMauro Carvalho Chehab			- ReadWriteAllocate:
353*34433332SMauro Carvalho Chehab					both writeallocate and readallocate
354246246cbSSudeep Holla
355*34433332SMauro Carvalho Chehab		attributes:
356*34433332SMauro Carvalho Chehab			    LEGACY used only on IA64 and is same as write_policy
357246246cbSSudeep Holla
358*34433332SMauro Carvalho Chehab		coherency_line_size:
359*34433332SMauro Carvalho Chehab				     the minimum amount of data in bytes that gets
360246246cbSSudeep Holla				     transferred from memory to cache
361246246cbSSudeep Holla
362*34433332SMauro Carvalho Chehab		level:
363*34433332SMauro Carvalho Chehab			the cache hierarchy in the multi-level cache configuration
364246246cbSSudeep Holla
365*34433332SMauro Carvalho Chehab		number_of_sets:
366*34433332SMauro Carvalho Chehab				total number of sets in the cache, a set is a
367246246cbSSudeep Holla				collection of cache lines with the same cache index
368246246cbSSudeep Holla
369*34433332SMauro Carvalho Chehab		physical_line_partition:
370*34433332SMauro Carvalho Chehab				number of physical cache line per cache tag
371246246cbSSudeep Holla
372*34433332SMauro Carvalho Chehab		shared_cpu_list:
373*34433332SMauro Carvalho Chehab				the list of logical cpus sharing the cache
374246246cbSSudeep Holla
375*34433332SMauro Carvalho Chehab		shared_cpu_map:
376*34433332SMauro Carvalho Chehab				logical cpu mask containing the list of cpus sharing
377246246cbSSudeep Holla				the cache
378246246cbSSudeep Holla
379*34433332SMauro Carvalho Chehab		size:
380*34433332SMauro Carvalho Chehab			the total cache size in kB
381246246cbSSudeep Holla
382246246cbSSudeep Holla		type:
383246246cbSSudeep Holla			- Instruction: cache that only holds instructions
384246246cbSSudeep Holla			- Data: cache that only caches data
385246246cbSSudeep Holla			- Unified: cache that holds both data and instructions
386246246cbSSudeep Holla
387*34433332SMauro Carvalho Chehab		ways_of_associativity:
388*34433332SMauro Carvalho Chehab			degree of freedom in placing a particular block
389246246cbSSudeep Holla			of memory in the cache
390246246cbSSudeep Holla
391246246cbSSudeep Holla		write_policy:
392*34433332SMauro Carvalho Chehab			- WriteThrough:
393*34433332SMauro Carvalho Chehab					data is written to both the cache line
394246246cbSSudeep Holla					and to the block in the lower-level memory
395*34433332SMauro Carvalho Chehab			- WriteBack:
396*34433332SMauro Carvalho Chehab				     data is written only to the cache line and
397246246cbSSudeep Holla				     the modified cache line is written to main
398246246cbSSudeep Holla				     memory only when it is replaced
3991b028984SShilpasri G Bhat
4001d78dc59STony Luck
4011d78dc59STony LuckWhat:		/sys/devices/system/cpu/cpu*/cache/index*/id
4021d78dc59STony LuckDate:		September 2016
4031d78dc59STony LuckContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4041d78dc59STony LuckDescription:	Cache id
4051d78dc59STony Luck
4061d78dc59STony Luck		The id provides a unique number for a specific instance of
4071d78dc59STony Luck		a cache of a particular type. E.g. there may be a level
4081d78dc59STony Luck		3 unified cache on each socket in a server and we may
4091d78dc59STony Luck		assign them ids 0, 1, 2, ...
4101d78dc59STony Luck
4111d78dc59STony Luck		Note that id value can be non-contiguous. E.g. level 1
4121d78dc59STony Luck		caches typically exist per core, but there may not be a
4131d78dc59STony Luck		power of two cores on a socket, so these caches may be
4141d78dc59STony Luck		numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
4151d78dc59STony Luck
4161b028984SShilpasri G BhatWhat:		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
4171b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
4181b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
4191b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
4201b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
4211b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
4221b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
4231b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
4241b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
4251b028984SShilpasri G BhatDate:		March 2016
4261b028984SShilpasri G BhatContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4271b028984SShilpasri G Bhat		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
4281b028984SShilpasri G BhatDescription:	POWERNV CPUFreq driver's frequency throttle stats directory and
4291b028984SShilpasri G Bhat		attributes
4301b028984SShilpasri G Bhat
4311b028984SShilpasri G Bhat		'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
4321b028984SShilpasri G Bhat		throttle stat attributes for the chip. The throttle stats of a cpu
4331b028984SShilpasri G Bhat		is common across all the cpus belonging to a chip. Below are the
4341b028984SShilpasri G Bhat		throttle attributes exported in the 'throttle_stats' directory:
4351b028984SShilpasri G Bhat
4361b028984SShilpasri G Bhat		- turbo_stat : This file gives the total number of times the max
4371b028984SShilpasri G Bhat		  frequency is throttled to lower frequency in turbo (at and above
4381b028984SShilpasri G Bhat		  nominal frequency) range of frequencies.
4391b028984SShilpasri G Bhat
4401b028984SShilpasri G Bhat		- sub_turbo_stat : This file gives the total number of times the
4411b028984SShilpasri G Bhat		  max frequency is throttled to lower frequency in sub-turbo(below
4421b028984SShilpasri G Bhat		  nominal frequency) range of frequencies.
4431b028984SShilpasri G Bhat
4441b028984SShilpasri G Bhat		- unthrottle : This file gives the total number of times the max
4451b028984SShilpasri G Bhat		  frequency is unthrottled after being throttled.
4461b028984SShilpasri G Bhat
4471b028984SShilpasri G Bhat		- powercap : This file gives the total number of times the max
4481b028984SShilpasri G Bhat		  frequency is throttled due to 'Power Capping'.
4491b028984SShilpasri G Bhat
4501b028984SShilpasri G Bhat		- overtemp : This file gives the total number of times the max
4511b028984SShilpasri G Bhat		  frequency is throttled due to 'CPU Over Temperature'.
4521b028984SShilpasri G Bhat
4531b028984SShilpasri G Bhat		- supply_fault : This file gives the total number of times the
4541b028984SShilpasri G Bhat		  max frequency is throttled due to 'Power Supply Failure'.
4551b028984SShilpasri G Bhat
4561b028984SShilpasri G Bhat		- overcurrent : This file gives the total number of times the
4571b028984SShilpasri G Bhat		  max frequency is throttled due to 'Overcurrent'.
4581b028984SShilpasri G Bhat
4591b028984SShilpasri G Bhat		- occ_reset : This file gives the total number of times the max
4601b028984SShilpasri G Bhat		  frequency is throttled due to 'OCC Reset'.
4611b028984SShilpasri G Bhat
4621b028984SShilpasri G Bhat		The sysfs attributes representing different throttle reasons like
4631b028984SShilpasri G Bhat		powercap, overtemp, supply_fault, overcurrent and occ_reset map to
4641b028984SShilpasri G Bhat		the reasons provided by OCC firmware for throttling the frequency.
4651b028984SShilpasri G Bhat
4661b028984SShilpasri G BhatWhat:		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats
4671b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
4681b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
4691b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
4701b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
4711b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
4721b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
4731b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
4741b028984SShilpasri G Bhat		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
4751b028984SShilpasri G BhatDate:		March 2016
4761b028984SShilpasri G BhatContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4771b028984SShilpasri G Bhat		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
4781b028984SShilpasri G BhatDescription:	POWERNV CPUFreq driver's frequency throttle stats directory and
4791b028984SShilpasri G Bhat		attributes
4801b028984SShilpasri G Bhat
4811b028984SShilpasri G Bhat		'policyX/throttle_stats' directory and all the attributes are same as
4821b028984SShilpasri G Bhat		the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
4831b028984SShilpasri G Bhat		attributes which give the frequency throttle information of the chip.
484f8d9f924SSteve Capper
485f8d9f924SSteve CapperWhat:		/sys/devices/system/cpu/cpuX/regs/
486f8d9f924SSteve Capper		/sys/devices/system/cpu/cpuX/regs/identification/
487f8d9f924SSteve Capper		/sys/devices/system/cpu/cpuX/regs/identification/midr_el1
488f8d9f924SSteve Capper		/sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
489f8d9f924SSteve CapperDate:		June 2016
490f8d9f924SSteve CapperContact:	Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
491f8d9f924SSteve CapperDescription:	AArch64 CPU registers
492*34433332SMauro Carvalho Chehab
493f8d9f924SSteve Capper		'identification' directory exposes the CPU ID registers for
494f8d9f924SSteve Capper		identifying model and revision of the CPU.
495a2b60670SJuri Lelli
496a2b60670SJuri LelliWhat:		/sys/devices/system/cpu/cpu#/cpu_capacity
497a2b60670SJuri LelliDate:		December 2016
498a2b60670SJuri LelliContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
499a2b60670SJuri LelliDescription:	information about CPUs heterogeneity.
500a2b60670SJuri Lelli
501a2b60670SJuri Lelli		cpu_capacity: capacity of cpu#.
50287590ce6SThomas Gleixner
50387590ce6SThomas GleixnerWhat:		/sys/devices/system/cpu/vulnerabilities
50487590ce6SThomas Gleixner		/sys/devices/system/cpu/vulnerabilities/meltdown
50587590ce6SThomas Gleixner		/sys/devices/system/cpu/vulnerabilities/spectre_v1
50687590ce6SThomas Gleixner		/sys/devices/system/cpu/vulnerabilities/spectre_v2
507c456442cSKonrad Rzeszutek Wilk		/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
508d90a7a0eSJiri Kosina		/sys/devices/system/cpu/vulnerabilities/l1tf
5098a4b06d3SThomas Gleixner		/sys/devices/system/cpu/vulnerabilities/mds
5107e5b3c26SMark Gross		/sys/devices/system/cpu/vulnerabilities/srbds
511a7a248c5SPawan Gupta		/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
512db4d30fbSVineela Tummalapalli		/sys/devices/system/cpu/vulnerabilities/itlb_multihit
5139ecccfaaSDavid WoodhouseDate:		January 2018
51487590ce6SThomas GleixnerContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
51587590ce6SThomas GleixnerDescription:	Information about CPU vulnerabilities
51687590ce6SThomas Gleixner
51787590ce6SThomas Gleixner		The files are named after the code names of CPU
51887590ce6SThomas Gleixner		vulnerabilities. The output of those files reflects the
51987590ce6SThomas Gleixner		state of the CPUs in the system. Possible output values:
52087590ce6SThomas Gleixner
521*34433332SMauro Carvalho Chehab		================  ==============================================
52287590ce6SThomas Gleixner		"Not affected"	  CPU is not affected by the vulnerability
52387590ce6SThomas Gleixner		"Vulnerable"	  CPU is affected and no mitigation in effect
5249ecccfaaSDavid Woodhouse		"Mitigation: $M"  CPU is affected and mitigation $M is in effect
525*34433332SMauro Carvalho Chehab		================  ==============================================
52605736e4aSThomas Gleixner
5275999bbe7SThomas Gleixner		See also: Documentation/admin-guide/hw-vuln/index.rst
528d90a7a0eSJiri Kosina
52905736e4aSThomas GleixnerWhat:		/sys/devices/system/cpu/smt
53005736e4aSThomas Gleixner		/sys/devices/system/cpu/smt/active
53105736e4aSThomas Gleixner		/sys/devices/system/cpu/smt/control
53205736e4aSThomas GleixnerDate:		June 2018
53305736e4aSThomas GleixnerContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
53405736e4aSThomas GleixnerDescription:	Control Symetric Multi Threading (SMT)
53505736e4aSThomas Gleixner
53605736e4aSThomas Gleixner		active:  Tells whether SMT is active (enabled and siblings online)
53705736e4aSThomas Gleixner
53805736e4aSThomas Gleixner		control: Read/write interface to control SMT. Possible
53905736e4aSThomas Gleixner			 values:
54005736e4aSThomas Gleixner
541*34433332SMauro Carvalho Chehab			 ================ =========================================
54205736e4aSThomas Gleixner			 "on"		  SMT is enabled
54305736e4aSThomas Gleixner			 "off"		  SMT is disabled
54405736e4aSThomas Gleixner			 "forceoff"	  SMT is force disabled. Cannot be changed.
54505736e4aSThomas Gleixner			 "notsupported"   SMT is not supported by the CPU
546de7b77e5SJosh Poimboeuf			 "notimplemented" SMT runtime toggling is not
547de7b77e5SJosh Poimboeuf					  implemented for the architecture
548*34433332SMauro Carvalho Chehab			 ================ =========================================
54905736e4aSThomas Gleixner
55005736e4aSThomas Gleixner			 If control status is "forceoff" or "notsupported" writes
55105736e4aSThomas Gleixner			 are rejected.
552b9c273baSRafael J. Wysocki
553b9c273baSRafael J. WysockiWhat:		/sys/devices/system/cpu/cpu#/power/energy_perf_bias
554b9c273baSRafael J. WysockiDate:		March 2019
555b9c273baSRafael J. WysockiContact:	linux-pm@vger.kernel.org
556b9c273baSRafael J. WysockiDescription:	Intel Energy and Performance Bias Hint (EPB)
557b9c273baSRafael J. Wysocki
558b9c273baSRafael J. Wysocki		EPB for the given CPU in a sliding scale 0 - 15, where a value
559b9c273baSRafael J. Wysocki		of 0 corresponds to a hint preference for highest performance
560b9c273baSRafael J. Wysocki		and a value of 15 corresponds to the maximum energy savings.
561b9c273baSRafael J. Wysocki
562b9c273baSRafael J. Wysocki		In order to change the EPB value for the CPU, write either
563b9c273baSRafael J. Wysocki		a number in the 0 - 15 sliding scale above, or one of the
564b9c273baSRafael J. Wysocki		strings: "performance", "balance-performance", "normal",
565b9c273baSRafael J. Wysocki		"balance-power", "power" (that represent values reflected by
566b9c273baSRafael J. Wysocki		their meaning), to this attribute.
567b9c273baSRafael J. Wysocki
568b9c273baSRafael J. Wysocki		This attribute is present for all online CPUs supporting the
569b9c273baSRafael J. Wysocki		Intel EPB feature.
570203dffacSFenghua Yu
571203dffacSFenghua YuWhat:		/sys/devices/system/cpu/umwait_control
572203dffacSFenghua Yu		/sys/devices/system/cpu/umwait_control/enable_c02
573203dffacSFenghua Yu		/sys/devices/system/cpu/umwait_control/max_time
574203dffacSFenghua YuDate:		May 2019
575203dffacSFenghua YuContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
576203dffacSFenghua YuDescription:	Umwait control
577203dffacSFenghua Yu
578203dffacSFenghua Yu		enable_c02: Read/write interface to control umwait C0.2 state
579203dffacSFenghua Yu			Read returns C0.2 state status:
580203dffacSFenghua Yu				0: C0.2 is disabled
581203dffacSFenghua Yu				1: C0.2 is enabled
582203dffacSFenghua Yu
583203dffacSFenghua Yu			Write 'y' or '1'  or 'on' to enable C0.2 state.
584203dffacSFenghua Yu			Write 'n' or '0'  or 'off' to disable C0.2 state.
585203dffacSFenghua Yu
586203dffacSFenghua Yu			The interface is case insensitive.
587203dffacSFenghua Yu
588203dffacSFenghua Yu		max_time: Read/write interface to control umwait maximum time
589203dffacSFenghua Yu			  in TSC-quanta that the CPU can reside in either C0.1
590203dffacSFenghua Yu			  or C0.2 state. The time is an unsigned 32-bit number.
591203dffacSFenghua Yu			  Note that a value of zero means there is no limit.
592203dffacSFenghua Yu			  Low order two bits must be zero.
593734560acSRyan Grimm
594734560acSRyan GrimmWhat:		/sys/devices/system/cpu/svm
595734560acSRyan GrimmDate:		August 2019
596734560acSRyan GrimmContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
597734560acSRyan Grimm		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
598734560acSRyan GrimmDescription:	Secure Virtual Machine
599734560acSRyan Grimm
600734560acSRyan Grimm		If 1, it means the system is using the Protected Execution
601734560acSRyan Grimm		Facility in POWER9 and newer processors. i.e., it is a Secure
602734560acSRyan Grimm		Virtual Machine.
603bde752c3SGautham R. Shenoy
604bde752c3SGautham R. ShenoyWhat: 		/sys/devices/system/cpu/cpuX/purr
605bde752c3SGautham R. ShenoyDate:		Apr 2005
606bde752c3SGautham R. ShenoyContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
607bde752c3SGautham R. ShenoyDescription:	PURR ticks for this CPU since the system boot.
608bde752c3SGautham R. Shenoy
609bde752c3SGautham R. Shenoy		The Processor Utilization Resources Register (PURR) is
610bde752c3SGautham R. Shenoy		a 64-bit counter which provides an estimate of the
611bde752c3SGautham R. Shenoy		resources used by the CPU thread. The contents of this
612bde752c3SGautham R. Shenoy		register increases monotonically. This sysfs interface
613bde752c3SGautham R. Shenoy		exposes the number of PURR ticks for cpuX.
614bde752c3SGautham R. Shenoy
615bde752c3SGautham R. ShenoyWhat: 		/sys/devices/system/cpu/cpuX/spurr
616bde752c3SGautham R. ShenoyDate:		Dec 2006
617bde752c3SGautham R. ShenoyContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
618bde752c3SGautham R. ShenoyDescription:	SPURR ticks for this CPU since the system boot.
619bde752c3SGautham R. Shenoy
620bde752c3SGautham R. Shenoy		The Scaled Processor Utilization Resources Register
621bde752c3SGautham R. Shenoy		(SPURR) is a 64-bit counter that provides a frequency
622bde752c3SGautham R. Shenoy		invariant estimate of the resources used by the CPU
623bde752c3SGautham R. Shenoy		thread. The contents of this register increases
624bde752c3SGautham R. Shenoy		monotonically. This sysfs interface exposes the number
625bde752c3SGautham R. Shenoy		of SPURR ticks for cpuX.
626bde752c3SGautham R. Shenoy
627bde752c3SGautham R. ShenoyWhat: 		/sys/devices/system/cpu/cpuX/idle_purr
628bde752c3SGautham R. ShenoyDate:		Apr 2020
629bde752c3SGautham R. ShenoyContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
630bde752c3SGautham R. ShenoyDescription:	PURR ticks for cpuX when it was idle.
631bde752c3SGautham R. Shenoy
632bde752c3SGautham R. Shenoy		This sysfs interface exposes the number of PURR ticks
633bde752c3SGautham R. Shenoy		for cpuX when it was idle.
634bde752c3SGautham R. Shenoy
635bde752c3SGautham R. ShenoyWhat: 		/sys/devices/system/cpu/cpuX/idle_spurr
636bde752c3SGautham R. ShenoyDate:		Apr 2020
637bde752c3SGautham R. ShenoyContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
638bde752c3SGautham R. ShenoyDescription:	SPURR ticks for cpuX when it was idle.
639bde752c3SGautham R. Shenoy
640bde752c3SGautham R. Shenoy		This sysfs interface exposes the number of SPURR ticks
641bde752c3SGautham R. Shenoy		for cpuX when it was idle.
642