sysfs-devices-system-cpu 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. What: /sys/devices/system/cpu/
  2. Date: pre-git history
  3. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  4. Description:
  5. A collection of both global and individual CPU attributes
  6. Individual CPU attributes are contained in subdirectories
  7. named by the kernel's logical CPU number, e.g.:
  8. /sys/devices/system/cpu/cpu#/
  9. What: /sys/devices/system/cpu/kernel_max
  10. /sys/devices/system/cpu/offline
  11. /sys/devices/system/cpu/online
  12. /sys/devices/system/cpu/possible
  13. /sys/devices/system/cpu/present
  14. Date: December 2008
  15. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  16. Description: CPU topology files that describe kernel limits related to
  17. hotplug. Briefly:
  18. kernel_max: the maximum cpu index allowed by the kernel
  19. configuration.
  20. offline: cpus that are not online because they have been
  21. HOTPLUGGED off or exceed the limit of cpus allowed by the
  22. kernel configuration (kernel_max above).
  23. online: cpus that are online and being scheduled.
  24. possible: cpus that have been allocated resources and can be
  25. brought online if they are present.
  26. present: cpus that have been identified as being present in
  27. the system.
  28. See Documentation/cputopology.txt for more information.
  29. What: /sys/devices/system/cpu/probe
  30. /sys/devices/system/cpu/release
  31. Date: November 2009
  32. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  33. Description: Dynamic addition and removal of CPU's. This is not hotplug
  34. removal, this is meant complete removal/addition of the CPU
  35. from the system.
  36. probe: writes to this file will dynamically add a CPU to the
  37. system. Information written to the file to add CPU's is
  38. architecture specific.
  39. release: writes to this file dynamically remove a CPU from
  40. the system. Information writtento the file to remove CPU's
  41. is architecture specific.
  42. What: /sys/devices/system/cpu/cpu#/node
  43. Date: October 2009
  44. Contact: Linux memory management mailing list <linux-mm@kvack.org>
  45. Description: Discover NUMA node a CPU belongs to
  46. When CONFIG_NUMA is enabled, a symbolic link that points
  47. to the corresponding NUMA node directory.
  48. For example, the following symlink is created for cpu42
  49. in NUMA node 2:
  50. /sys/devices/system/cpu/cpu42/node2 -> ../../node/node2
  51. What: /sys/devices/system/cpu/cpu#/topology/core_id
  52. /sys/devices/system/cpu/cpu#/topology/core_siblings
  53. /sys/devices/system/cpu/cpu#/topology/core_siblings_list
  54. /sys/devices/system/cpu/cpu#/topology/physical_package_id
  55. /sys/devices/system/cpu/cpu#/topology/thread_siblings
  56. /sys/devices/system/cpu/cpu#/topology/thread_siblings_list
  57. Date: December 2008
  58. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  59. Description: CPU topology files that describe a logical CPU's relationship
  60. to other cores and threads in the same physical package.
  61. One cpu# directory is created per logical CPU in the system,
  62. e.g. /sys/devices/system/cpu/cpu42/.
  63. Briefly, the files above are:
  64. core_id: the CPU core ID of cpu#. Typically it is the
  65. hardware platform's identifier (rather than the kernel's).
  66. The actual value is architecture and platform dependent.
  67. core_siblings: internal kernel map of cpu#'s hardware threads
  68. within the same physical_package_id.
  69. core_siblings_list: human-readable list of the logical CPU
  70. numbers within the same physical_package_id as cpu#.
  71. physical_package_id: physical package id of cpu#. Typically
  72. corresponds to a physical socket number, but the actual value
  73. is architecture and platform dependent.
  74. thread_siblings: internel kernel map of cpu#'s hardware
  75. threads within the same core as cpu#
  76. thread_siblings_list: human-readable list of cpu#'s hardware
  77. threads within the same core as cpu#
  78. See Documentation/cputopology.txt for more information.
  79. What: /sys/devices/system/cpu/cpuidle/current_driver
  80. /sys/devices/system/cpu/cpuidle/current_governer_ro
  81. /sys/devices/system/cpu/cpuidle/available_governors
  82. /sys/devices/system/cpu/cpuidle/current_governor
  83. Date: September 2007
  84. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  85. Description: Discover cpuidle policy and mechanism
  86. Various CPUs today support multiple idle levels that are
  87. differentiated by varying exit latencies and power
  88. consumption during idle.
  89. Idle policy (governor) is differentiated from idle mechanism
  90. (driver)
  91. current_driver: (RO) displays current idle mechanism
  92. current_governor_ro: (RO) displays current idle policy
  93. With the cpuidle_sysfs_switch boot option enabled (meant for
  94. developer testing), the following three attributes are visible
  95. instead:
  96. current_driver: same as described above
  97. available_governors: (RO) displays a space separated list of
  98. available governors
  99. current_governor: (RW) displays current idle policy. Users can
  100. switch the governor at runtime by writing to this file.
  101. See files in Documentation/cpuidle/ for more information.
  102. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
  103. /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency
  104. /sys/devices/system/cpu/cpuX/cpuidle/stateN/power
  105. /sys/devices/system/cpu/cpuX/cpuidle/stateN/time
  106. /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
  107. Date: September 2007
  108. KernelVersion: v2.6.24
  109. Contact: Linux power management list <linux-pm@vger.kernel.org>
  110. Description:
  111. The directory /sys/devices/system/cpu/cpuX/cpuidle contains per
  112. logical CPU specific cpuidle information for each online cpu X.
  113. The processor idle states which are available for use have the
  114. following attributes:
  115. name: (RO) Name of the idle state (string).
  116. latency: (RO) The latency to exit out of this idle state (in
  117. microseconds).
  118. power: (RO) The power consumed while in this idle state (in
  119. milliwatts).
  120. time: (RO) The total time spent in this idle state (in microseconds).
  121. usage: (RO) Number of times this state was entered (a count).
  122. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
  123. Date: February 2008
  124. KernelVersion: v2.6.25
  125. Contact: Linux power management list <linux-pm@vger.kernel.org>
  126. Description:
  127. (RO) A small description about the idle state (string).
  128. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
  129. Date: March 2012
  130. KernelVersion: v3.10
  131. Contact: Linux power management list <linux-pm@vger.kernel.org>
  132. Description:
  133. (RW) Option to disable this idle state (bool). The behavior and
  134. the effect of the disable variable depends on the implementation
  135. of a particular governor. In the ladder governor, for example,
  136. it is not coherent, i.e. if one is disabling a light state, then
  137. all deeper states are disabled as well, but the disable variable
  138. does not reflect it. Likewise, if one enables a deep state but a
  139. lighter state still is disabled, then this has no effect.
  140. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
  141. Date: March 2014
  142. KernelVersion: v3.15
  143. Contact: Linux power management list <linux-pm@vger.kernel.org>
  144. Description:
  145. (RO) Display the target residency i.e. the minimum amount of
  146. time (in microseconds) this cpu should spend in this idle state
  147. to make the transition worth the effort.
  148. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/
  149. Date: March 2018
  150. KernelVersion: v4.17
  151. Contact: Linux power management list <linux-pm@vger.kernel.org>
  152. Description:
  153. Idle state usage statistics related to suspend-to-idle.
  154. This attribute group is only present for states that can be
  155. used in suspend-to-idle with suspended timekeeping.
  156. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/time
  157. Date: March 2018
  158. KernelVersion: v4.17
  159. Contact: Linux power management list <linux-pm@vger.kernel.org>
  160. Description:
  161. Total time spent by the CPU in suspend-to-idle (with scheduler
  162. tick suspended) after requesting this state.
  163. What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/s2idle/usage
  164. Date: March 2018
  165. KernelVersion: v4.17
  166. Contact: Linux power management list <linux-pm@vger.kernel.org>
  167. Description:
  168. Total number of times this state has been requested by the CPU
  169. while entering suspend-to-idle.
  170. What: /sys/devices/system/cpu/cpu#/cpufreq/*
  171. Date: pre-git history
  172. Contact: linux-pm@vger.kernel.org
  173. Description: Discover and change clock speed of CPUs
  174. Clock scaling allows you to change the clock speed of the
  175. CPUs on the fly. This is a nice method to save battery
  176. power, because the lower the clock speed, the less power
  177. the CPU consumes.
  178. There are many knobs to tweak in this directory.
  179. See files in Documentation/cpu-freq/ for more information.
  180. What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
  181. Date: June 2013
  182. Contact: linux-pm@vger.kernel.org
  183. Description: Discover CPUs in the same CPU frequency coordination domain
  184. freqdomain_cpus is the list of CPUs (online+offline) that share
  185. the same clock/freq domain (possibly at the hardware level).
  186. That information may be hidden from the cpufreq core and the
  187. value of related_cpus may be different from freqdomain_cpus. This
  188. attribute is useful for user space DVFS controllers to get better
  189. power/performance results for platforms using acpi-cpufreq.
  190. This file is only present if the acpi-cpufreq driver is in use.
  191. What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
  192. Date: August 2008
  193. KernelVersion: 2.6.27
  194. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  195. Description: Disable L3 cache indices
  196. These files exist in every CPU's cache/index3 directory. Each
  197. cache_disable_{0,1} file corresponds to one disable slot which
  198. can be used to disable a cache index. Reading from these files
  199. on a processor with this functionality will return the currently
  200. disabled index for that node. There is one L3 structure per
  201. node, or per internal node on MCM machines. Writing a valid
  202. index to one of these files will cause the specificed cache
  203. index to be disabled.
  204. All AMD processors with L3 caches provide this functionality.
  205. For details, see BKDGs at
  206. http://developer.amd.com/documentation/guides/Pages/default.aspx
  207. What: /sys/devices/system/cpu/cpufreq/boost
  208. Date: August 2012
  209. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  210. Description: Processor frequency boosting control
  211. This switch controls the boost setting for the whole system.
  212. Boosting allows the CPU and the firmware to run at a frequency
  213. beyound it's nominal limit.
  214. More details can be found in
  215. Documentation/admin-guide/pm/cpufreq.rst
  216. What: /sys/devices/system/cpu/cpu#/crash_notes
  217. /sys/devices/system/cpu/cpu#/crash_notes_size
  218. Date: April 2013
  219. Contact: kexec@lists.infradead.org
  220. Description: address and size of the percpu note.
  221. crash_notes: the physical address of the memory that holds the
  222. note of cpu#.
  223. crash_notes_size: size of the note of cpu#.
  224. What: /sys/devices/system/cpu/intel_pstate/max_perf_pct
  225. /sys/devices/system/cpu/intel_pstate/min_perf_pct
  226. /sys/devices/system/cpu/intel_pstate/no_turbo
  227. Date: February 2013
  228. Contact: linux-pm@vger.kernel.org
  229. Description: Parameters for the Intel P-state driver
  230. Logic for selecting the current P-state in Intel
  231. Sandybridge+ processors. The three knobs control
  232. limits for the P-state that will be requested by the
  233. driver.
  234. max_perf_pct: limits the maximum P state that will be requested by
  235. the driver stated as a percentage of the available performance.
  236. min_perf_pct: limits the minimum P state that will be requested by
  237. the driver stated as a percentage of the available performance.
  238. no_turbo: limits the driver to selecting P states below the turbo
  239. frequency range.
  240. More details can be found in
  241. Documentation/admin-guide/pm/intel_pstate.rst
  242. What: /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
  243. Date: July 2014(documented, existed before August 2008)
  244. Contact: Sudeep Holla <sudeep.holla@arm.com>
  245. Linux kernel mailing list <linux-kernel@vger.kernel.org>
  246. Description: Parameters for the CPU cache attributes
  247. allocation_policy:
  248. - WriteAllocate: allocate a memory location to a cache line
  249. on a cache miss because of a write
  250. - ReadAllocate: allocate a memory location to a cache line
  251. on a cache miss because of a read
  252. - ReadWriteAllocate: both writeallocate and readallocate
  253. attributes: LEGACY used only on IA64 and is same as write_policy
  254. coherency_line_size: the minimum amount of data in bytes that gets
  255. transferred from memory to cache
  256. level: the cache hierarchy in the multi-level cache configuration
  257. number_of_sets: total number of sets in the cache, a set is a
  258. collection of cache lines with the same cache index
  259. physical_line_partition: number of physical cache line per cache tag
  260. shared_cpu_list: the list of logical cpus sharing the cache
  261. shared_cpu_map: logical cpu mask containing the list of cpus sharing
  262. the cache
  263. size: the total cache size in kB
  264. type:
  265. - Instruction: cache that only holds instructions
  266. - Data: cache that only caches data
  267. - Unified: cache that holds both data and instructions
  268. ways_of_associativity: degree of freedom in placing a particular block
  269. of memory in the cache
  270. write_policy:
  271. - WriteThrough: data is written to both the cache line
  272. and to the block in the lower-level memory
  273. - WriteBack: data is written only to the cache line and
  274. the modified cache line is written to main
  275. memory only when it is replaced
  276. What: /sys/devices/system/cpu/cpu*/cache/index*/id
  277. Date: September 2016
  278. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  279. Description: Cache id
  280. The id provides a unique number for a specific instance of
  281. a cache of a particular type. E.g. there may be a level
  282. 3 unified cache on each socket in a server and we may
  283. assign them ids 0, 1, 2, ...
  284. Note that id value can be non-contiguous. E.g. level 1
  285. caches typically exist per core, but there may not be a
  286. power of two cores on a socket, so these caches may be
  287. numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
  288. What: /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
  289. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
  290. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
  291. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
  292. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
  293. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
  294. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
  295. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
  296. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
  297. Date: March 2016
  298. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  299. Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
  300. Description: POWERNV CPUFreq driver's frequency throttle stats directory and
  301. attributes
  302. 'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
  303. throttle stat attributes for the chip. The throttle stats of a cpu
  304. is common across all the cpus belonging to a chip. Below are the
  305. throttle attributes exported in the 'throttle_stats' directory:
  306. - turbo_stat : This file gives the total number of times the max
  307. frequency is throttled to lower frequency in turbo (at and above
  308. nominal frequency) range of frequencies.
  309. - sub_turbo_stat : This file gives the total number of times the
  310. max frequency is throttled to lower frequency in sub-turbo(below
  311. nominal frequency) range of frequencies.
  312. - unthrottle : This file gives the total number of times the max
  313. frequency is unthrottled after being throttled.
  314. - powercap : This file gives the total number of times the max
  315. frequency is throttled due to 'Power Capping'.
  316. - overtemp : This file gives the total number of times the max
  317. frequency is throttled due to 'CPU Over Temperature'.
  318. - supply_fault : This file gives the total number of times the
  319. max frequency is throttled due to 'Power Supply Failure'.
  320. - overcurrent : This file gives the total number of times the
  321. max frequency is throttled due to 'Overcurrent'.
  322. - occ_reset : This file gives the total number of times the max
  323. frequency is throttled due to 'OCC Reset'.
  324. The sysfs attributes representing different throttle reasons like
  325. powercap, overtemp, supply_fault, overcurrent and occ_reset map to
  326. the reasons provided by OCC firmware for throttling the frequency.
  327. What: /sys/devices/system/cpu/cpufreq/policyX/throttle_stats
  328. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
  329. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
  330. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
  331. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
  332. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
  333. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
  334. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
  335. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
  336. Date: March 2016
  337. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  338. Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
  339. Description: POWERNV CPUFreq driver's frequency throttle stats directory and
  340. attributes
  341. 'policyX/throttle_stats' directory and all the attributes are same as
  342. the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
  343. attributes which give the frequency throttle information of the chip.
  344. What: /sys/devices/system/cpu/cpuX/regs/
  345. /sys/devices/system/cpu/cpuX/regs/identification/
  346. /sys/devices/system/cpu/cpuX/regs/identification/midr_el1
  347. /sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
  348. Date: June 2016
  349. Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
  350. Description: AArch64 CPU registers
  351. 'identification' directory exposes the CPU ID registers for
  352. identifying model and revision of the CPU.
  353. What: /sys/devices/system/cpu/cpu#/cpu_capacity
  354. Date: December 2016
  355. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  356. Description: information about CPUs heterogeneity.
  357. cpu_capacity: capacity of cpu#.
  358. What: /sys/devices/system/cpu/vulnerabilities
  359. /sys/devices/system/cpu/vulnerabilities/meltdown
  360. /sys/devices/system/cpu/vulnerabilities/spectre_v1
  361. /sys/devices/system/cpu/vulnerabilities/spectre_v2
  362. /sys/devices/system/cpu/vulnerabilities/spec_store_bypass
  363. Date: January 2018
  364. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  365. Description: Information about CPU vulnerabilities
  366. The files are named after the code names of CPU
  367. vulnerabilities. The output of those files reflects the
  368. state of the CPUs in the system. Possible output values:
  369. "Not affected" CPU is not affected by the vulnerability
  370. "Vulnerable" CPU is affected and no mitigation in effect
  371. "Mitigation: $M" CPU is affected and mitigation $M is in effect