xref: /linux/Documentation/ABI/testing/sysfs-devices-system-cpu (revision eecaaba5b2e4ae762b4726fae2e3b22630e137ec)
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
12e6dcfa7cSAlex ChiangWhat:		/sys/devices/system/cpu/sched_mc_power_savings
13e6dcfa7cSAlex Chiang		/sys/devices/system/cpu/sched_smt_power_savings
14e6dcfa7cSAlex ChiangDate:		June 2006
15e6dcfa7cSAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
16e6dcfa7cSAlex ChiangDescription:	Discover and adjust the kernel's multi-core scheduler support.
17e6dcfa7cSAlex Chiang
18e6dcfa7cSAlex Chiang		Possible values are:
19e6dcfa7cSAlex Chiang
20e6dcfa7cSAlex Chiang		0 - No power saving load balance (default value)
21e6dcfa7cSAlex Chiang		1 - Fill one thread/core/package first for long running threads
22e6dcfa7cSAlex Chiang		2 - Also bias task wakeups to semi-idle cpu package for power
23e6dcfa7cSAlex Chiang		    savings
24e6dcfa7cSAlex Chiang
25e6dcfa7cSAlex Chiang		sched_mc_power_savings is dependent upon SCHED_MC, which is
26e6dcfa7cSAlex Chiang		itself architecture dependent.
27e6dcfa7cSAlex Chiang
28e6dcfa7cSAlex Chiang		sched_smt_power_savings is dependent upon SCHED_SMT, which
29e6dcfa7cSAlex Chiang		is itself architecture dependent.
30e6dcfa7cSAlex Chiang
31e6dcfa7cSAlex Chiang		The two files are independent of each other. It is possible
32e6dcfa7cSAlex Chiang		that one file may be present without the other.
33e6dcfa7cSAlex Chiang
34e6dcfa7cSAlex Chiang		Introduced by git commit 5c45bf27.
35e6dcfa7cSAlex Chiang
362ceb3fb0SAlex Chiang
37d93fc863SAlex ChiangWhat:		/sys/devices/system/cpu/kernel_max
38d93fc863SAlex Chiang		/sys/devices/system/cpu/offline
39d93fc863SAlex Chiang		/sys/devices/system/cpu/online
40d93fc863SAlex Chiang		/sys/devices/system/cpu/possible
41d93fc863SAlex Chiang		/sys/devices/system/cpu/present
42d93fc863SAlex ChiangDate:		December 2008
43d93fc863SAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
44d93fc863SAlex ChiangDescription:	CPU topology files that describe kernel limits related to
45d93fc863SAlex Chiang		hotplug. Briefly:
46d93fc863SAlex Chiang
47d93fc863SAlex Chiang		kernel_max: the maximum cpu index allowed by the kernel
48d93fc863SAlex Chiang		configuration.
49d93fc863SAlex Chiang
50d93fc863SAlex Chiang		offline: cpus that are not online because they have been
51d93fc863SAlex Chiang		HOTPLUGGED off or exceed the limit of cpus allowed by the
52d93fc863SAlex Chiang		kernel configuration (kernel_max above).
53d93fc863SAlex Chiang
54d93fc863SAlex Chiang		online: cpus that are online and being scheduled.
55d93fc863SAlex Chiang
56d93fc863SAlex Chiang		possible: cpus that have been allocated resources and can be
57d93fc863SAlex Chiang		brought online if they are present.
58d93fc863SAlex Chiang
59d93fc863SAlex Chiang		present: cpus that have been identified as being present in
60d93fc863SAlex Chiang		the system.
61d93fc863SAlex Chiang
62d93fc863SAlex Chiang		See Documentation/cputopology.txt for more information.
63d93fc863SAlex Chiang
64d93fc863SAlex Chiang
6512633e80SNathan FontenotWhat:		/sys/devices/system/cpu/probe
6612633e80SNathan Fontenot		/sys/devices/system/cpu/release
6712633e80SNathan FontenotDate:		November 2009
6812633e80SNathan FontenotContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
6912633e80SNathan FontenotDescription:	Dynamic addition and removal of CPU's.  This is not hotplug
7012633e80SNathan Fontenot		removal, this is meant complete removal/addition of the CPU
7112633e80SNathan Fontenot		from the system.
7212633e80SNathan Fontenot
7312633e80SNathan Fontenot		probe: writes to this file will dynamically add a CPU to the
7412633e80SNathan Fontenot		system.  Information written to the file to add CPU's is
7512633e80SNathan Fontenot		architecture specific.
7612633e80SNathan Fontenot
7712633e80SNathan Fontenot		release: writes to this file dynamically remove a CPU from
7812633e80SNathan Fontenot		the system.  Information writtento the file to remove CPU's
7912633e80SNathan Fontenot		is architecture specific.
80657348a0SAlex Chiang
81657348a0SAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/node
82657348a0SAlex ChiangDate:		October 2009
83657348a0SAlex ChiangContact:	Linux memory management mailing list <linux-mm@kvack.org>
84657348a0SAlex ChiangDescription:	Discover NUMA node a CPU belongs to
85657348a0SAlex Chiang
86657348a0SAlex Chiang		When CONFIG_NUMA is enabled, a symbolic link that points
87657348a0SAlex Chiang		to the corresponding NUMA node directory.
88657348a0SAlex Chiang
89657348a0SAlex Chiang		For example, the following symlink is created for cpu42
90657348a0SAlex Chiang		in NUMA node 2:
91657348a0SAlex Chiang
92657348a0SAlex Chiang		/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
93657348a0SAlex Chiang
94657348a0SAlex Chiang
95cba5dd7fSAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/node
96cba5dd7fSAlex ChiangDate:		October 2009
97cba5dd7fSAlex ChiangContact:	Linux memory management mailing list <linux-mm@kvack.org>
98cba5dd7fSAlex ChiangDescription:	Discover NUMA node a CPU belongs to
99cba5dd7fSAlex Chiang
100cba5dd7fSAlex Chiang		When CONFIG_NUMA is enabled, a symbolic link that points
101cba5dd7fSAlex Chiang		to the corresponding NUMA node directory.
102cba5dd7fSAlex Chiang
103cba5dd7fSAlex Chiang		For example, the following symlink is created for cpu42
104cba5dd7fSAlex Chiang		in NUMA node 2:
105cba5dd7fSAlex Chiang
106cba5dd7fSAlex Chiang		/sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
107cba5dd7fSAlex Chiang
108cba5dd7fSAlex Chiang
109663fb2fcSAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/topology/core_id
110663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/core_siblings
111663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/core_siblings_list
112663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/physical_package_id
113663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/thread_siblings
114663fb2fcSAlex Chiang		/sys/devices/system/cpu/cpu#/topology/thread_siblings_list
115663fb2fcSAlex ChiangDate:		December 2008
116663fb2fcSAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
117663fb2fcSAlex ChiangDescription:	CPU topology files that describe a logical CPU's relationship
118663fb2fcSAlex Chiang		to other cores and threads in the same physical package.
119663fb2fcSAlex Chiang
120663fb2fcSAlex Chiang		One cpu# directory is created per logical CPU in the system,
121663fb2fcSAlex Chiang		e.g. /sys/devices/system/cpu/cpu42/.
122663fb2fcSAlex Chiang
123663fb2fcSAlex Chiang		Briefly, the files above are:
124663fb2fcSAlex Chiang
125663fb2fcSAlex Chiang		core_id: the CPU core ID of cpu#. Typically it is the
126663fb2fcSAlex Chiang		hardware platform's identifier (rather than the kernel's).
127663fb2fcSAlex Chiang		The actual value is architecture and platform dependent.
128663fb2fcSAlex Chiang
129663fb2fcSAlex Chiang		core_siblings: internal kernel map of cpu#'s hardware threads
130663fb2fcSAlex Chiang		within the same physical_package_id.
131663fb2fcSAlex Chiang
132663fb2fcSAlex Chiang		core_siblings_list: human-readable list of the logical CPU
133663fb2fcSAlex Chiang		numbers within the same physical_package_id as cpu#.
134663fb2fcSAlex Chiang
135663fb2fcSAlex Chiang		physical_package_id: physical package id of cpu#. Typically
136663fb2fcSAlex Chiang		corresponds to a physical socket number, but the actual value
137663fb2fcSAlex Chiang		is architecture and platform dependent.
138663fb2fcSAlex Chiang
139663fb2fcSAlex Chiang		thread_siblings: internel kernel map of cpu#'s hardware
140663fb2fcSAlex Chiang		threads within the same core as cpu#
141663fb2fcSAlex Chiang
142663fb2fcSAlex Chiang		thread_siblings_list: human-readable list of cpu#'s hardware
143663fb2fcSAlex Chiang		threads within the same core as cpu#
144663fb2fcSAlex Chiang
145663fb2fcSAlex Chiang		See Documentation/cputopology.txt for more information.
146663fb2fcSAlex Chiang
147663fb2fcSAlex Chiang
148c1fb5c47SAlex ChiangWhat:		/sys/devices/system/cpu/cpuidle/current_driver
149c1fb5c47SAlex Chiang		/sys/devices/system/cpu/cpuidle/current_governer_ro
150c1fb5c47SAlex ChiangDate:		September 2007
151c1fb5c47SAlex ChiangContact:	Linux kernel mailing list <linux-kernel@vger.kernel.org>
152c1fb5c47SAlex ChiangDescription:	Discover cpuidle policy and mechanism
153c1fb5c47SAlex Chiang
154c1fb5c47SAlex Chiang		Various CPUs today support multiple idle levels that are
155c1fb5c47SAlex Chiang		differentiated by varying exit latencies and power
156c1fb5c47SAlex Chiang		consumption during idle.
157c1fb5c47SAlex Chiang
158c1fb5c47SAlex Chiang		Idle policy (governor) is differentiated from idle mechanism
159c1fb5c47SAlex Chiang		(driver)
160c1fb5c47SAlex Chiang
161c1fb5c47SAlex Chiang		current_driver: displays current idle mechanism
162c1fb5c47SAlex Chiang
163c1fb5c47SAlex Chiang		current_governor_ro: displays current idle policy
164c1fb5c47SAlex Chiang
165c1fb5c47SAlex Chiang		See files in Documentation/cpuidle/ for more information.
166c1fb5c47SAlex Chiang
167c1fb5c47SAlex Chiang
1680cda8b91SAlex ChiangWhat:		/sys/devices/system/cpu/cpu#/cpufreq/*
1690cda8b91SAlex ChiangDate:		pre-git history
1700cda8b91SAlex ChiangContact:	cpufreq@vger.kernel.org
1710cda8b91SAlex ChiangDescription:	Discover and change clock speed of CPUs
1720cda8b91SAlex Chiang
1730cda8b91SAlex Chiang		Clock scaling allows you to change the clock speed of the
1740cda8b91SAlex Chiang		CPUs on the fly. This is a nice method to save battery
1750cda8b91SAlex Chiang		power, because the lower the clock speed, the less power
1760cda8b91SAlex Chiang		the CPU consumes.
1770cda8b91SAlex Chiang
1780cda8b91SAlex Chiang		There are many knobs to tweak in this directory.
1790cda8b91SAlex Chiang
1800cda8b91SAlex Chiang		See files in Documentation/cpu-freq/ for more information.
1810cda8b91SAlex Chiang
1820cda8b91SAlex Chiang		In particular, read Documentation/cpu-freq/user-guide.txt
1830cda8b91SAlex Chiang		to learn how to control the knobs.
1840cda8b91SAlex Chiang
1850cda8b91SAlex Chiang
186*eecaaba5SBorislav PetkovWhat:		/sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
187468727abSAlex ChiangDate:		August 2008
188468727abSAlex ChiangKernelVersion:	2.6.27
189*eecaaba5SBorislav PetkovContact:	discuss@x86-64.org
190*eecaaba5SBorislav PetkovDescription:	Disable L3 cache indices
191468727abSAlex Chiang
192*eecaaba5SBorislav Petkov		These files exist in every CPU's cache/index3 directory. Each
193*eecaaba5SBorislav Petkov		cache_disable_{0,1} file corresponds to one disable slot which
194*eecaaba5SBorislav Petkov		can be used to disable a cache index. Reading from these files
195*eecaaba5SBorislav Petkov		on a processor with this functionality will return the currently
196*eecaaba5SBorislav Petkov		disabled index for that node. There is one L3 structure per
197*eecaaba5SBorislav Petkov		node, or per internal node on MCM machines. Writing a valid
198*eecaaba5SBorislav Petkov		index to one of these files will cause the specificed cache
199*eecaaba5SBorislav Petkov		index to be disabled.
200*eecaaba5SBorislav Petkov
201*eecaaba5SBorislav Petkov		All AMD processors with L3 caches provide this functionality.
202*eecaaba5SBorislav Petkov		For details, see BKDGs at
203*eecaaba5SBorislav Petkov		http://developer.amd.com/documentation/guides/Pages/default.aspx
204