xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-devices-system-cpu (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/
2*4882a593SmuzhiyunDate:		pre-git history
3*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
4*4882a593SmuzhiyunDescription:
5*4882a593Smuzhiyun		A collection of both global and individual CPU attributes
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun		Individual CPU attributes are contained in subdirectories
8*4882a593Smuzhiyun		named by the kernel's logical CPU number, e.g.:
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/kernel_max
13*4882a593Smuzhiyun		/sys/devices/system/cpu/offline
14*4882a593Smuzhiyun		/sys/devices/system/cpu/online
15*4882a593Smuzhiyun		/sys/devices/system/cpu/possible
16*4882a593Smuzhiyun		/sys/devices/system/cpu/present
17*4882a593SmuzhiyunDate:		December 2008
18*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
19*4882a593SmuzhiyunDescription:	CPU topology files that describe kernel limits related to
20*4882a593Smuzhiyun		hotplug. Briefly:
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun		kernel_max: the maximum cpu index allowed by the kernel
23*4882a593Smuzhiyun		configuration.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun		offline: cpus that are not online because they have been
26*4882a593Smuzhiyun		HOTPLUGGED off or exceed the limit of cpus allowed by the
27*4882a593Smuzhiyun		kernel configuration (kernel_max above).
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun		online: cpus that are online and being scheduled.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun		possible: cpus that have been allocated resources and can be
32*4882a593Smuzhiyun		brought online if they are present.
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun		present: cpus that have been identified as being present in
35*4882a593Smuzhiyun		the system.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun		See Documentation/admin-guide/cputopology.rst for more information.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/probe
41*4882a593Smuzhiyun		/sys/devices/system/cpu/release
42*4882a593SmuzhiyunDate:		November 2009
43*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
44*4882a593SmuzhiyunDescription:	Dynamic addition and removal of CPU's.  This is not hotplug
45*4882a593Smuzhiyun		removal, this is meant complete removal/addition of the CPU
46*4882a593Smuzhiyun		from the system.
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun		probe: writes to this file will dynamically add a CPU to the
49*4882a593Smuzhiyun		system.  Information written to the file to add CPU's is
50*4882a593Smuzhiyun		architecture specific.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun		release: writes to this file dynamically remove a CPU from
53*4882a593Smuzhiyun		the system.  Information writtento the file to remove CPU's
54*4882a593Smuzhiyun		is architecture specific.
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/node
57*4882a593SmuzhiyunDate:		October 2009
58*4882a593SmuzhiyunContact:	Linux memory management mailing list <linux-mm@kvack.org>
59*4882a593SmuzhiyunDescription:	Discover NUMA node a CPU belongs to
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun		When CONFIG_NUMA is enabled, a symbolic link that points
62*4882a593Smuzhiyun		to the corresponding NUMA node directory.
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun		For example, the following symlink is created for cpu42
65*4882a593Smuzhiyun		in NUMA node 2:
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun
70*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/topology/core_id
71*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/topology/core_siblings
72*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/topology/core_siblings_list
73*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/topology/physical_package_id
74*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/topology/thread_siblings
75*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/topology/thread_siblings_list
76*4882a593SmuzhiyunDate:		December 2008
77*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
78*4882a593SmuzhiyunDescription:	CPU topology files that describe a logical CPU's relationship
79*4882a593Smuzhiyun		to other cores and threads in the same physical package.
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun		One cpu# directory is created per logical CPU in the system,
82*4882a593Smuzhiyun		e.g. /sys/devices/system/cpu/cpu42/.
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun		Briefly, the files above are:
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun		core_id: the CPU core ID of cpu#. Typically it is the
87*4882a593Smuzhiyun		hardware platform's identifier (rather than the kernel's).
88*4882a593Smuzhiyun		The actual value is architecture and platform dependent.
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun		core_siblings: internal kernel map of cpu#'s hardware threads
91*4882a593Smuzhiyun		within the same physical_package_id.
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun		core_siblings_list: human-readable list of the logical CPU
94*4882a593Smuzhiyun		numbers within the same physical_package_id as cpu#.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun		physical_package_id: physical package id of cpu#. Typically
97*4882a593Smuzhiyun		corresponds to a physical socket number, but the actual value
98*4882a593Smuzhiyun		is architecture and platform dependent.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun		thread_siblings: internel kernel map of cpu#'s hardware
101*4882a593Smuzhiyun		threads within the same core as cpu#
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun		thread_siblings_list: human-readable list of cpu#'s hardware
104*4882a593Smuzhiyun		threads within the same core as cpu#
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun		See Documentation/admin-guide/cputopology.rst for more information.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuidle/available_governors
110*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuidle/current_driver
111*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuidle/current_governor
112*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuidle/current_governer_ro
113*4882a593SmuzhiyunDate:		September 2007
114*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
115*4882a593SmuzhiyunDescription:	Discover cpuidle policy and mechanism
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun		Various CPUs today support multiple idle levels that are
118*4882a593Smuzhiyun		differentiated by varying exit latencies and power
119*4882a593Smuzhiyun		consumption during idle.
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun		Idle policy (governor) is differentiated from idle mechanism
122*4882a593Smuzhiyun		(driver).
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun		available_governors: (RO) displays a space separated list of
125*4882a593Smuzhiyun		available governors.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun		current_driver: (RO) displays current idle mechanism.
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun		current_governor: (RW) displays current idle policy. Users can
130*4882a593Smuzhiyun		switch the governor at runtime by writing to this file.
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun		current_governor_ro: (RO) displays current idle policy.
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun		See Documentation/admin-guide/pm/cpuidle.rst and
135*4882a593Smuzhiyun		Documentation/driver-api/pm/cpuidle.rst for more information.
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/name
139*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/latency
140*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/power
141*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/time
142*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
143*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/above
144*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpuidle/stateN/below
145*4882a593SmuzhiyunDate:		September 2007
146*4882a593SmuzhiyunKernelVersion:	v2.6.24
147*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
148*4882a593SmuzhiyunDescription:
149*4882a593Smuzhiyun		The directory /sys/devices/system/cpu/cpuX/cpuidle contains per
150*4882a593Smuzhiyun		logical CPU specific cpuidle information for each online cpu X.
151*4882a593Smuzhiyun		The processor idle states which are available for use have the
152*4882a593Smuzhiyun		following attributes:
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun		======== ==== =================================================
155*4882a593Smuzhiyun		name:	 (RO) Name of the idle state (string).
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun		latency: (RO) The latency to exit out of this idle state (in
158*4882a593Smuzhiyun			      microseconds).
159*4882a593Smuzhiyun
160*4882a593Smuzhiyun		power:   (RO) The power consumed while in this idle state (in
161*4882a593Smuzhiyun			      milliwatts).
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun		time:    (RO) The total time spent in this idle state
164*4882a593Smuzhiyun			      (in microseconds).
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun		usage:	 (RO) Number of times this state was entered (a count).
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun		above:	 (RO) Number of times this state was entered, but the
169*4882a593Smuzhiyun			      observed CPU idle duration was too short for it
170*4882a593Smuzhiyun			      (a count).
171*4882a593Smuzhiyun
172*4882a593Smuzhiyun		below:	 (RO) Number of times this state was entered, but the
173*4882a593Smuzhiyun			      observed CPU idle duration was too long for it
174*4882a593Smuzhiyun			      (a count).
175*4882a593Smuzhiyun		======== ==== =================================================
176*4882a593Smuzhiyun
177*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
178*4882a593SmuzhiyunDate:		February 2008
179*4882a593SmuzhiyunKernelVersion:	v2.6.25
180*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
181*4882a593SmuzhiyunDescription:
182*4882a593Smuzhiyun		(RO) A small description about the idle state (string).
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun
185*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
186*4882a593SmuzhiyunDate:		March 2012
187*4882a593SmuzhiyunKernelVersion:	v3.10
188*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
189*4882a593SmuzhiyunDescription:
190*4882a593Smuzhiyun		(RW) Option to disable this idle state (bool). The behavior and
191*4882a593Smuzhiyun		the effect of the disable variable depends on the implementation
192*4882a593Smuzhiyun		of a particular governor. In the ladder governor, for example,
193*4882a593Smuzhiyun		it is not coherent, i.e. if one is disabling a light state, then
194*4882a593Smuzhiyun		all deeper states are disabled as well, but the disable variable
195*4882a593Smuzhiyun		does not reflect it. Likewise, if one enables a deep state but a
196*4882a593Smuzhiyun		lighter state still is disabled, then this has no effect.
197*4882a593Smuzhiyun
198*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/default_status
199*4882a593SmuzhiyunDate:		December 2019
200*4882a593SmuzhiyunKernelVersion:	v5.6
201*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
202*4882a593SmuzhiyunDescription:
203*4882a593Smuzhiyun		(RO) The default status of this state, "enabled" or "disabled".
204*4882a593Smuzhiyun
205*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
206*4882a593SmuzhiyunDate:		March 2014
207*4882a593SmuzhiyunKernelVersion:	v3.15
208*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
209*4882a593SmuzhiyunDescription:
210*4882a593Smuzhiyun		(RO) Display the target residency i.e. the minimum amount of
211*4882a593Smuzhiyun		time (in microseconds) this cpu should spend in this idle state
212*4882a593Smuzhiyun		to make the transition worth the effort.
213*4882a593Smuzhiyun
214*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
215*4882a593SmuzhiyunDate:		March 2018
216*4882a593SmuzhiyunKernelVersion:	v4.17
217*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
218*4882a593SmuzhiyunDescription:
219*4882a593Smuzhiyun		Idle state usage statistics related to suspend-to-idle.
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun		This attribute group is only present for states that can be
222*4882a593Smuzhiyun		used in suspend-to-idle with suspended timekeeping.
223*4882a593Smuzhiyun
224*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
225*4882a593SmuzhiyunDate:		March 2018
226*4882a593SmuzhiyunKernelVersion:	v4.17
227*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
228*4882a593SmuzhiyunDescription:
229*4882a593Smuzhiyun		Total time spent by the CPU in suspend-to-idle (with scheduler
230*4882a593Smuzhiyun		tick suspended) after requesting this state.
231*4882a593Smuzhiyun
232*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
233*4882a593SmuzhiyunDate:		March 2018
234*4882a593SmuzhiyunKernelVersion:	v4.17
235*4882a593SmuzhiyunContact:	Linux power management list <linux-pm@vger.kernel.org>
236*4882a593SmuzhiyunDescription:
237*4882a593Smuzhiyun		Total number of times this state has been requested by the CPU
238*4882a593Smuzhiyun		while entering suspend-to-idle.
239*4882a593Smuzhiyun
240*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/cpufreq/*
241*4882a593SmuzhiyunDate:		pre-git history
242*4882a593SmuzhiyunContact:	linux-pm@vger.kernel.org
243*4882a593SmuzhiyunDescription:	Discover and change clock speed of CPUs
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun		Clock scaling allows you to change the clock speed of the
246*4882a593Smuzhiyun		CPUs on the fly. This is a nice method to save battery
247*4882a593Smuzhiyun		power, because the lower the clock speed, the less power
248*4882a593Smuzhiyun		the CPU consumes.
249*4882a593Smuzhiyun
250*4882a593Smuzhiyun		There are many knobs to tweak in this directory.
251*4882a593Smuzhiyun
252*4882a593Smuzhiyun		See files in Documentation/cpu-freq/ for more information.
253*4882a593Smuzhiyun
254*4882a593Smuzhiyun
255*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
256*4882a593SmuzhiyunDate:		June 2013
257*4882a593SmuzhiyunContact:	linux-pm@vger.kernel.org
258*4882a593SmuzhiyunDescription:	Discover CPUs in the same CPU frequency coordination domain
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun		freqdomain_cpus is the list of CPUs (online+offline) that share
261*4882a593Smuzhiyun		the same clock/freq domain (possibly at the hardware level).
262*4882a593Smuzhiyun		That information may be hidden from the cpufreq core and the
263*4882a593Smuzhiyun		value of related_cpus may be different from freqdomain_cpus. This
264*4882a593Smuzhiyun		attribute is useful for user space DVFS controllers to get better
265*4882a593Smuzhiyun		power/performance results for platforms using acpi-cpufreq.
266*4882a593Smuzhiyun
267*4882a593Smuzhiyun		This file is only present if the acpi-cpufreq driver is in use.
268*4882a593Smuzhiyun
269*4882a593Smuzhiyun
270*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
271*4882a593SmuzhiyunDate:		August 2008
272*4882a593SmuzhiyunKernelVersion:	2.6.27
273*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
274*4882a593SmuzhiyunDescription:	Disable L3 cache indices
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun		These files exist in every CPU's cache/index3 directory. Each
277*4882a593Smuzhiyun		cache_disable_{0,1} file corresponds to one disable slot which
278*4882a593Smuzhiyun		can be used to disable a cache index. Reading from these files
279*4882a593Smuzhiyun		on a processor with this functionality will return the currently
280*4882a593Smuzhiyun		disabled index for that node. There is one L3 structure per
281*4882a593Smuzhiyun		node, or per internal node on MCM machines. Writing a valid
282*4882a593Smuzhiyun		index to one of these files will cause the specificed cache
283*4882a593Smuzhiyun		index to be disabled.
284*4882a593Smuzhiyun
285*4882a593Smuzhiyun		All AMD processors with L3 caches provide this functionality.
286*4882a593Smuzhiyun		For details, see BKDGs at
287*4882a593Smuzhiyun		http://developer.amd.com/documentation/guides/Pages/default.aspx
288*4882a593Smuzhiyun
289*4882a593Smuzhiyun
290*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpufreq/boost
291*4882a593SmuzhiyunDate:		August 2012
292*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
293*4882a593SmuzhiyunDescription:	Processor frequency boosting control
294*4882a593Smuzhiyun
295*4882a593Smuzhiyun		This switch controls the boost setting for the whole system.
296*4882a593Smuzhiyun		Boosting allows the CPU and the firmware to run at a frequency
297*4882a593Smuzhiyun		beyound it's nominal limit.
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun		More details can be found in
300*4882a593Smuzhiyun		Documentation/admin-guide/pm/cpufreq.rst
301*4882a593Smuzhiyun
302*4882a593Smuzhiyun
303*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/crash_notes
304*4882a593Smuzhiyun		/sys/devices/system/cpu/cpu#/crash_notes_size
305*4882a593SmuzhiyunDate:		April 2013
306*4882a593SmuzhiyunContact:	kexec@lists.infradead.org
307*4882a593SmuzhiyunDescription:	address and size of the percpu note.
308*4882a593Smuzhiyun
309*4882a593Smuzhiyun		crash_notes: the physical address of the memory that holds the
310*4882a593Smuzhiyun		note of cpu#.
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun		crash_notes_size: size of the note of cpu#.
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun
315*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/intel_pstate/max_perf_pct
316*4882a593Smuzhiyun		/sys/devices/system/cpu/intel_pstate/min_perf_pct
317*4882a593Smuzhiyun		/sys/devices/system/cpu/intel_pstate/no_turbo
318*4882a593SmuzhiyunDate:		February 2013
319*4882a593SmuzhiyunContact:	linux-pm@vger.kernel.org
320*4882a593SmuzhiyunDescription:	Parameters for the Intel P-state driver
321*4882a593Smuzhiyun
322*4882a593Smuzhiyun		Logic for selecting the current P-state in Intel
323*4882a593Smuzhiyun		Sandybridge+ processors. The three knobs control
324*4882a593Smuzhiyun		limits for the P-state that will be requested by the
325*4882a593Smuzhiyun		driver.
326*4882a593Smuzhiyun
327*4882a593Smuzhiyun		max_perf_pct: limits the maximum P state that will be requested by
328*4882a593Smuzhiyun		the driver stated as a percentage of the available performance.
329*4882a593Smuzhiyun
330*4882a593Smuzhiyun		min_perf_pct: limits the minimum P state that will be requested by
331*4882a593Smuzhiyun		the driver stated as a percentage of the available performance.
332*4882a593Smuzhiyun
333*4882a593Smuzhiyun		no_turbo: limits the driver to selecting P states below the turbo
334*4882a593Smuzhiyun		frequency range.
335*4882a593Smuzhiyun
336*4882a593Smuzhiyun		More details can be found in
337*4882a593Smuzhiyun		Documentation/admin-guide/pm/intel_pstate.rst
338*4882a593Smuzhiyun
339*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
340*4882a593SmuzhiyunDate:		July 2014(documented, existed before August 2008)
341*4882a593SmuzhiyunContact:	Sudeep Holla <sudeep.holla@arm.com>
342*4882a593Smuzhiyun		Linux kernel mailing list <linux-kernel@vger.kernel.org>
343*4882a593SmuzhiyunDescription:	Parameters for the CPU cache attributes
344*4882a593Smuzhiyun
345*4882a593Smuzhiyun		allocation_policy:
346*4882a593Smuzhiyun			- WriteAllocate:
347*4882a593Smuzhiyun					allocate a memory location to a cache line
348*4882a593Smuzhiyun					on a cache miss because of a write
349*4882a593Smuzhiyun			- ReadAllocate:
350*4882a593Smuzhiyun					allocate a memory location to a cache line
351*4882a593Smuzhiyun					on a cache miss because of a read
352*4882a593Smuzhiyun			- ReadWriteAllocate:
353*4882a593Smuzhiyun					both writeallocate and readallocate
354*4882a593Smuzhiyun
355*4882a593Smuzhiyun		attributes:
356*4882a593Smuzhiyun			    LEGACY used only on IA64 and is same as write_policy
357*4882a593Smuzhiyun
358*4882a593Smuzhiyun		coherency_line_size:
359*4882a593Smuzhiyun				     the minimum amount of data in bytes that gets
360*4882a593Smuzhiyun				     transferred from memory to cache
361*4882a593Smuzhiyun
362*4882a593Smuzhiyun		level:
363*4882a593Smuzhiyun			the cache hierarchy in the multi-level cache configuration
364*4882a593Smuzhiyun
365*4882a593Smuzhiyun		number_of_sets:
366*4882a593Smuzhiyun				total number of sets in the cache, a set is a
367*4882a593Smuzhiyun				collection of cache lines with the same cache index
368*4882a593Smuzhiyun
369*4882a593Smuzhiyun		physical_line_partition:
370*4882a593Smuzhiyun				number of physical cache line per cache tag
371*4882a593Smuzhiyun
372*4882a593Smuzhiyun		shared_cpu_list:
373*4882a593Smuzhiyun				the list of logical cpus sharing the cache
374*4882a593Smuzhiyun
375*4882a593Smuzhiyun		shared_cpu_map:
376*4882a593Smuzhiyun				logical cpu mask containing the list of cpus sharing
377*4882a593Smuzhiyun				the cache
378*4882a593Smuzhiyun
379*4882a593Smuzhiyun		size:
380*4882a593Smuzhiyun			the total cache size in kB
381*4882a593Smuzhiyun
382*4882a593Smuzhiyun		type:
383*4882a593Smuzhiyun			- Instruction: cache that only holds instructions
384*4882a593Smuzhiyun			- Data: cache that only caches data
385*4882a593Smuzhiyun			- Unified: cache that holds both data and instructions
386*4882a593Smuzhiyun
387*4882a593Smuzhiyun		ways_of_associativity:
388*4882a593Smuzhiyun			degree of freedom in placing a particular block
389*4882a593Smuzhiyun			of memory in the cache
390*4882a593Smuzhiyun
391*4882a593Smuzhiyun		write_policy:
392*4882a593Smuzhiyun			- WriteThrough:
393*4882a593Smuzhiyun					data is written to both the cache line
394*4882a593Smuzhiyun					and to the block in the lower-level memory
395*4882a593Smuzhiyun			- WriteBack:
396*4882a593Smuzhiyun				     data is written only to the cache line and
397*4882a593Smuzhiyun				     the modified cache line is written to main
398*4882a593Smuzhiyun				     memory only when it is replaced
399*4882a593Smuzhiyun
400*4882a593Smuzhiyun
401*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu*/cache/index*/id
402*4882a593SmuzhiyunDate:		September 2016
403*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
404*4882a593SmuzhiyunDescription:	Cache id
405*4882a593Smuzhiyun
406*4882a593Smuzhiyun		The id provides a unique number for a specific instance of
407*4882a593Smuzhiyun		a cache of a particular type. E.g. there may be a level
408*4882a593Smuzhiyun		3 unified cache on each socket in a server and we may
409*4882a593Smuzhiyun		assign them ids 0, 1, 2, ...
410*4882a593Smuzhiyun
411*4882a593Smuzhiyun		Note that id value can be non-contiguous. E.g. level 1
412*4882a593Smuzhiyun		caches typically exist per core, but there may not be a
413*4882a593Smuzhiyun		power of two cores on a socket, so these caches may be
414*4882a593Smuzhiyun		numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
415*4882a593Smuzhiyun
416*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
417*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
418*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
419*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
420*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
421*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
422*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
423*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
424*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
425*4882a593SmuzhiyunDate:		March 2016
426*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
427*4882a593Smuzhiyun		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
428*4882a593SmuzhiyunDescription:	POWERNV CPUFreq driver's frequency throttle stats directory and
429*4882a593Smuzhiyun		attributes
430*4882a593Smuzhiyun
431*4882a593Smuzhiyun		'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
432*4882a593Smuzhiyun		throttle stat attributes for the chip. The throttle stats of a cpu
433*4882a593Smuzhiyun		is common across all the cpus belonging to a chip. Below are the
434*4882a593Smuzhiyun		throttle attributes exported in the 'throttle_stats' directory:
435*4882a593Smuzhiyun
436*4882a593Smuzhiyun		- turbo_stat : This file gives the total number of times the max
437*4882a593Smuzhiyun		  frequency is throttled to lower frequency in turbo (at and above
438*4882a593Smuzhiyun		  nominal frequency) range of frequencies.
439*4882a593Smuzhiyun
440*4882a593Smuzhiyun		- sub_turbo_stat : This file gives the total number of times the
441*4882a593Smuzhiyun		  max frequency is throttled to lower frequency in sub-turbo(below
442*4882a593Smuzhiyun		  nominal frequency) range of frequencies.
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun		- unthrottle : This file gives the total number of times the max
445*4882a593Smuzhiyun		  frequency is unthrottled after being throttled.
446*4882a593Smuzhiyun
447*4882a593Smuzhiyun		- powercap : This file gives the total number of times the max
448*4882a593Smuzhiyun		  frequency is throttled due to 'Power Capping'.
449*4882a593Smuzhiyun
450*4882a593Smuzhiyun		- overtemp : This file gives the total number of times the max
451*4882a593Smuzhiyun		  frequency is throttled due to 'CPU Over Temperature'.
452*4882a593Smuzhiyun
453*4882a593Smuzhiyun		- supply_fault : This file gives the total number of times the
454*4882a593Smuzhiyun		  max frequency is throttled due to 'Power Supply Failure'.
455*4882a593Smuzhiyun
456*4882a593Smuzhiyun		- overcurrent : This file gives the total number of times the
457*4882a593Smuzhiyun		  max frequency is throttled due to 'Overcurrent'.
458*4882a593Smuzhiyun
459*4882a593Smuzhiyun		- occ_reset : This file gives the total number of times the max
460*4882a593Smuzhiyun		  frequency is throttled due to 'OCC Reset'.
461*4882a593Smuzhiyun
462*4882a593Smuzhiyun		The sysfs attributes representing different throttle reasons like
463*4882a593Smuzhiyun		powercap, overtemp, supply_fault, overcurrent and occ_reset map to
464*4882a593Smuzhiyun		the reasons provided by OCC firmware for throttling the frequency.
465*4882a593Smuzhiyun
466*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats
467*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
468*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
469*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
470*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
471*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
472*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
473*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
474*4882a593Smuzhiyun		/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
475*4882a593SmuzhiyunDate:		March 2016
476*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
477*4882a593Smuzhiyun		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
478*4882a593SmuzhiyunDescription:	POWERNV CPUFreq driver's frequency throttle stats directory and
479*4882a593Smuzhiyun		attributes
480*4882a593Smuzhiyun
481*4882a593Smuzhiyun		'policyX/throttle_stats' directory and all the attributes are same as
482*4882a593Smuzhiyun		the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
483*4882a593Smuzhiyun		attributes which give the frequency throttle information of the chip.
484*4882a593Smuzhiyun
485*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/regs/
486*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/regs/identification/
487*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/regs/identification/midr_el1
488*4882a593Smuzhiyun		/sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
489*4882a593SmuzhiyunDate:		June 2016
490*4882a593SmuzhiyunContact:	Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
491*4882a593SmuzhiyunDescription:	AArch64 CPU registers
492*4882a593Smuzhiyun
493*4882a593Smuzhiyun		'identification' directory exposes the CPU ID registers for
494*4882a593Smuzhiyun		identifying model and revision of the CPU.
495*4882a593Smuzhiyun
496*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/aarch32_el0
497*4882a593SmuzhiyunDate:		November 2020
498*4882a593SmuzhiyunContact:	Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
499*4882a593SmuzhiyunDescription:	Identifies the subset of CPUs in the system that can execute
500*4882a593Smuzhiyun		AArch32 (32-bit ARM) applications. If present, the same format as
501*4882a593Smuzhiyun		/sys/devices/system/cpu/{offline,online,possible,present} is used.
502*4882a593Smuzhiyun		If absent, then all or none of the CPUs can execute AArch32
503*4882a593Smuzhiyun		applications and execve() will behave accordingly.
504*4882a593Smuzhiyun
505*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/cpu_capacity
506*4882a593SmuzhiyunDate:		December 2016
507*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
508*4882a593SmuzhiyunDescription:	information about CPUs heterogeneity.
509*4882a593Smuzhiyun
510*4882a593Smuzhiyun		cpu_capacity: capacity of cpu#.
511*4882a593Smuzhiyun
512*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/vulnerabilities
513*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/meltdown
514*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/spectre_v1
515*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/spectre_v2
516*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
517*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/l1tf
518*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/mds
519*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/srbds
520*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
521*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/itlb_multihit
522*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
523*4882a593Smuzhiyun		/sys/devices/system/cpu/vulnerabilities/retbleed
524*4882a593SmuzhiyunDate:		January 2018
525*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
526*4882a593SmuzhiyunDescription:	Information about CPU vulnerabilities
527*4882a593Smuzhiyun
528*4882a593Smuzhiyun		The files are named after the code names of CPU
529*4882a593Smuzhiyun		vulnerabilities. The output of those files reflects the
530*4882a593Smuzhiyun		state of the CPUs in the system. Possible output values:
531*4882a593Smuzhiyun
532*4882a593Smuzhiyun		================  ==============================================
533*4882a593Smuzhiyun		"Not affected"	  CPU is not affected by the vulnerability
534*4882a593Smuzhiyun		"Vulnerable"	  CPU is affected and no mitigation in effect
535*4882a593Smuzhiyun		"Mitigation: $M"  CPU is affected and mitigation $M is in effect
536*4882a593Smuzhiyun		================  ==============================================
537*4882a593Smuzhiyun
538*4882a593Smuzhiyun		See also: Documentation/admin-guide/hw-vuln/index.rst
539*4882a593Smuzhiyun
540*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/smt
541*4882a593Smuzhiyun		/sys/devices/system/cpu/smt/active
542*4882a593Smuzhiyun		/sys/devices/system/cpu/smt/control
543*4882a593SmuzhiyunDate:		June 2018
544*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
545*4882a593SmuzhiyunDescription:	Control Symetric Multi Threading (SMT)
546*4882a593Smuzhiyun
547*4882a593Smuzhiyun		active:  Tells whether SMT is active (enabled and siblings online)
548*4882a593Smuzhiyun
549*4882a593Smuzhiyun		control: Read/write interface to control SMT. Possible
550*4882a593Smuzhiyun			 values:
551*4882a593Smuzhiyun
552*4882a593Smuzhiyun			 ================ =========================================
553*4882a593Smuzhiyun			 "on"		  SMT is enabled
554*4882a593Smuzhiyun			 "off"		  SMT is disabled
555*4882a593Smuzhiyun			 "forceoff"	  SMT is force disabled. Cannot be changed.
556*4882a593Smuzhiyun			 "notsupported"   SMT is not supported by the CPU
557*4882a593Smuzhiyun			 "notimplemented" SMT runtime toggling is not
558*4882a593Smuzhiyun					  implemented for the architecture
559*4882a593Smuzhiyun			 ================ =========================================
560*4882a593Smuzhiyun
561*4882a593Smuzhiyun			 If control status is "forceoff" or "notsupported" writes
562*4882a593Smuzhiyun			 are rejected.
563*4882a593Smuzhiyun
564*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpu#/power/energy_perf_bias
565*4882a593SmuzhiyunDate:		March 2019
566*4882a593SmuzhiyunContact:	linux-pm@vger.kernel.org
567*4882a593SmuzhiyunDescription:	Intel Energy and Performance Bias Hint (EPB)
568*4882a593Smuzhiyun
569*4882a593Smuzhiyun		EPB for the given CPU in a sliding scale 0 - 15, where a value
570*4882a593Smuzhiyun		of 0 corresponds to a hint preference for highest performance
571*4882a593Smuzhiyun		and a value of 15 corresponds to the maximum energy savings.
572*4882a593Smuzhiyun
573*4882a593Smuzhiyun		In order to change the EPB value for the CPU, write either
574*4882a593Smuzhiyun		a number in the 0 - 15 sliding scale above, or one of the
575*4882a593Smuzhiyun		strings: "performance", "balance-performance", "normal",
576*4882a593Smuzhiyun		"balance-power", "power" (that represent values reflected by
577*4882a593Smuzhiyun		their meaning), to this attribute.
578*4882a593Smuzhiyun
579*4882a593Smuzhiyun		This attribute is present for all online CPUs supporting the
580*4882a593Smuzhiyun		Intel EPB feature.
581*4882a593Smuzhiyun
582*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/umwait_control
583*4882a593Smuzhiyun		/sys/devices/system/cpu/umwait_control/enable_c02
584*4882a593Smuzhiyun		/sys/devices/system/cpu/umwait_control/max_time
585*4882a593SmuzhiyunDate:		May 2019
586*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
587*4882a593SmuzhiyunDescription:	Umwait control
588*4882a593Smuzhiyun
589*4882a593Smuzhiyun		enable_c02: Read/write interface to control umwait C0.2 state
590*4882a593Smuzhiyun			Read returns C0.2 state status:
591*4882a593Smuzhiyun				0: C0.2 is disabled
592*4882a593Smuzhiyun				1: C0.2 is enabled
593*4882a593Smuzhiyun
594*4882a593Smuzhiyun			Write 'y' or '1'  or 'on' to enable C0.2 state.
595*4882a593Smuzhiyun			Write 'n' or '0'  or 'off' to disable C0.2 state.
596*4882a593Smuzhiyun
597*4882a593Smuzhiyun			The interface is case insensitive.
598*4882a593Smuzhiyun
599*4882a593Smuzhiyun		max_time: Read/write interface to control umwait maximum time
600*4882a593Smuzhiyun			  in TSC-quanta that the CPU can reside in either C0.1
601*4882a593Smuzhiyun			  or C0.2 state. The time is an unsigned 32-bit number.
602*4882a593Smuzhiyun			  Note that a value of zero means there is no limit.
603*4882a593Smuzhiyun			  Low order two bits must be zero.
604*4882a593Smuzhiyun
605*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/svm
606*4882a593SmuzhiyunDate:		August 2019
607*4882a593SmuzhiyunContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
608*4882a593Smuzhiyun		Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
609*4882a593SmuzhiyunDescription:	Secure Virtual Machine
610*4882a593Smuzhiyun
611*4882a593Smuzhiyun		If 1, it means the system is using the Protected Execution
612*4882a593Smuzhiyun		Facility in POWER9 and newer processors. i.e., it is a Secure
613*4882a593Smuzhiyun		Virtual Machine.
614*4882a593Smuzhiyun
615*4882a593SmuzhiyunWhat:		/sys/devices/system/cpu/cpuX/purr
616*4882a593SmuzhiyunDate:		Apr 2005
617*4882a593SmuzhiyunContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
618*4882a593SmuzhiyunDescription:	PURR ticks for this CPU since the system boot.
619*4882a593Smuzhiyun
620*4882a593Smuzhiyun		The Processor Utilization Resources Register (PURR) is
621*4882a593Smuzhiyun		a 64-bit counter which provides an estimate of the
622*4882a593Smuzhiyun		resources used by the CPU thread. The contents of this
623*4882a593Smuzhiyun		register increases monotonically. This sysfs interface
624*4882a593Smuzhiyun		exposes the number of PURR ticks for cpuX.
625*4882a593Smuzhiyun
626*4882a593SmuzhiyunWhat: 		/sys/devices/system/cpu/cpuX/spurr
627*4882a593SmuzhiyunDate:		Dec 2006
628*4882a593SmuzhiyunContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
629*4882a593SmuzhiyunDescription:	SPURR ticks for this CPU since the system boot.
630*4882a593Smuzhiyun
631*4882a593Smuzhiyun		The Scaled Processor Utilization Resources Register
632*4882a593Smuzhiyun		(SPURR) is a 64-bit counter that provides a frequency
633*4882a593Smuzhiyun		invariant estimate of the resources used by the CPU
634*4882a593Smuzhiyun		thread. The contents of this register increases
635*4882a593Smuzhiyun		monotonically. This sysfs interface exposes the number
636*4882a593Smuzhiyun		of SPURR ticks for cpuX.
637*4882a593Smuzhiyun
638*4882a593SmuzhiyunWhat: 		/sys/devices/system/cpu/cpuX/idle_purr
639*4882a593SmuzhiyunDate:		Apr 2020
640*4882a593SmuzhiyunContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
641*4882a593SmuzhiyunDescription:	PURR ticks for cpuX when it was idle.
642*4882a593Smuzhiyun
643*4882a593Smuzhiyun		This sysfs interface exposes the number of PURR ticks
644*4882a593Smuzhiyun		for cpuX when it was idle.
645*4882a593Smuzhiyun
646*4882a593SmuzhiyunWhat: 		/sys/devices/system/cpu/cpuX/idle_spurr
647*4882a593SmuzhiyunDate:		Apr 2020
648*4882a593SmuzhiyunContact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
649*4882a593SmuzhiyunDescription:	SPURR ticks for cpuX when it was idle.
650*4882a593Smuzhiyun
651*4882a593Smuzhiyun		This sysfs interface exposes the number of SPURR ticks
652*4882a593Smuzhiyun		for cpuX when it was idle.
653*4882a593Smuzhiyun
654*4882a593SmuzhiyunWhat: 		/sys/devices/system/cpu/cpuX/mte_tcf_preferred
655*4882a593SmuzhiyunDate:		July 2021
656*4882a593SmuzhiyunContact:	Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
657*4882a593SmuzhiyunDescription:	Preferred MTE tag checking mode
658*4882a593Smuzhiyun
659*4882a593Smuzhiyun		When a user program specifies more than one MTE tag checking
660*4882a593Smuzhiyun		mode, this sysfs node is used to specify which mode should
661*4882a593Smuzhiyun		be preferred when running on that CPU. Possible values:
662*4882a593Smuzhiyun
663*4882a593Smuzhiyun		================  ==============================================
664*4882a593Smuzhiyun		"sync"	  	  Prefer synchronous mode
665*4882a593Smuzhiyun		"async"	  	  Prefer asynchronous mode
666*4882a593Smuzhiyun		================  ==============================================
667*4882a593Smuzhiyun
668*4882a593Smuzhiyun		Changes to this sysfs node may not take effect immediately.
669*4882a593Smuzhiyun
670*4882a593Smuzhiyun		See also: Documentation/arm64/memory-tagging-extension.rst
671