sysfs-devices-system-cpu 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  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/cpu#/cpufreq/*
  149. Date: pre-git history
  150. Contact: linux-pm@vger.kernel.org
  151. Description: Discover and change clock speed of CPUs
  152. Clock scaling allows you to change the clock speed of the
  153. CPUs on the fly. This is a nice method to save battery
  154. power, because the lower the clock speed, the less power
  155. the CPU consumes.
  156. There are many knobs to tweak in this directory.
  157. See files in Documentation/cpu-freq/ for more information.
  158. In particular, read Documentation/cpu-freq/user-guide.txt
  159. to learn how to control the knobs.
  160. What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
  161. Date: June 2013
  162. Contact: linux-pm@vger.kernel.org
  163. Description: Discover CPUs in the same CPU frequency coordination domain
  164. freqdomain_cpus is the list of CPUs (online+offline) that share
  165. the same clock/freq domain (possibly at the hardware level).
  166. That information may be hidden from the cpufreq core and the
  167. value of related_cpus may be different from freqdomain_cpus. This
  168. attribute is useful for user space DVFS controllers to get better
  169. power/performance results for platforms using acpi-cpufreq.
  170. This file is only present if the acpi-cpufreq driver is in use.
  171. What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
  172. Date: August 2008
  173. KernelVersion: 2.6.27
  174. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  175. Description: Disable L3 cache indices
  176. These files exist in every CPU's cache/index3 directory. Each
  177. cache_disable_{0,1} file corresponds to one disable slot which
  178. can be used to disable a cache index. Reading from these files
  179. on a processor with this functionality will return the currently
  180. disabled index for that node. There is one L3 structure per
  181. node, or per internal node on MCM machines. Writing a valid
  182. index to one of these files will cause the specificed cache
  183. index to be disabled.
  184. All AMD processors with L3 caches provide this functionality.
  185. For details, see BKDGs at
  186. http://developer.amd.com/documentation/guides/Pages/default.aspx
  187. What: /sys/devices/system/cpu/cpufreq/boost
  188. Date: August 2012
  189. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  190. Description: Processor frequency boosting control
  191. This switch controls the boost setting for the whole system.
  192. Boosting allows the CPU and the firmware to run at a frequency
  193. beyound it's nominal limit.
  194. More details can be found in
  195. Documentation/admin-guide/pm/cpufreq.rst
  196. What: /sys/devices/system/cpu/cpu#/crash_notes
  197. /sys/devices/system/cpu/cpu#/crash_notes_size
  198. Date: April 2013
  199. Contact: kexec@lists.infradead.org
  200. Description: address and size of the percpu note.
  201. crash_notes: the physical address of the memory that holds the
  202. note of cpu#.
  203. crash_notes_size: size of the note of cpu#.
  204. What: /sys/devices/system/cpu/intel_pstate/max_perf_pct
  205. /sys/devices/system/cpu/intel_pstate/min_perf_pct
  206. /sys/devices/system/cpu/intel_pstate/no_turbo
  207. Date: February 2013
  208. Contact: linux-pm@vger.kernel.org
  209. Description: Parameters for the Intel P-state driver
  210. Logic for selecting the current P-state in Intel
  211. Sandybridge+ processors. The three knobs control
  212. limits for the P-state that will be requested by the
  213. driver.
  214. max_perf_pct: limits the maximum P state that will be requested by
  215. the driver stated as a percentage of the available performance.
  216. min_perf_pct: limits the minimum P state that will be requested by
  217. the driver stated as a percentage of the available performance.
  218. no_turbo: limits the driver to selecting P states below the turbo
  219. frequency range.
  220. More details can be found in
  221. Documentation/admin-guide/pm/intel_pstate.rst
  222. What: /sys/devices/system/cpu/cpu*/cache/index*/<set_of_attributes_mentioned_below>
  223. Date: July 2014(documented, existed before August 2008)
  224. Contact: Sudeep Holla <sudeep.holla@arm.com>
  225. Linux kernel mailing list <linux-kernel@vger.kernel.org>
  226. Description: Parameters for the CPU cache attributes
  227. allocation_policy:
  228. - WriteAllocate: allocate a memory location to a cache line
  229. on a cache miss because of a write
  230. - ReadAllocate: allocate a memory location to a cache line
  231. on a cache miss because of a read
  232. - ReadWriteAllocate: both writeallocate and readallocate
  233. attributes: LEGACY used only on IA64 and is same as write_policy
  234. coherency_line_size: the minimum amount of data in bytes that gets
  235. transferred from memory to cache
  236. level: the cache hierarchy in the multi-level cache configuration
  237. number_of_sets: total number of sets in the cache, a set is a
  238. collection of cache lines with the same cache index
  239. physical_line_partition: number of physical cache line per cache tag
  240. shared_cpu_list: the list of logical cpus sharing the cache
  241. shared_cpu_map: logical cpu mask containing the list of cpus sharing
  242. the cache
  243. size: the total cache size in kB
  244. type:
  245. - Instruction: cache that only holds instructions
  246. - Data: cache that only caches data
  247. - Unified: cache that holds both data and instructions
  248. ways_of_associativity: degree of freedom in placing a particular block
  249. of memory in the cache
  250. write_policy:
  251. - WriteThrough: data is written to both the cache line
  252. and to the block in the lower-level memory
  253. - WriteBack: data is written only to the cache line and
  254. the modified cache line is written to main
  255. memory only when it is replaced
  256. What: /sys/devices/system/cpu/cpu*/cache/index*/id
  257. Date: September 2016
  258. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  259. Description: Cache id
  260. The id provides a unique number for a specific instance of
  261. a cache of a particular type. E.g. there may be a level
  262. 3 unified cache on each socket in a server and we may
  263. assign them ids 0, 1, 2, ...
  264. Note that id value can be non-contiguous. E.g. level 1
  265. caches typically exist per core, but there may not be a
  266. power of two cores on a socket, so these caches may be
  267. numbered 0, 1, 2, 3, 4, 5, 8, 9, 10, ...
  268. What: /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
  269. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/turbo_stat
  270. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/sub_turbo_stat
  271. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/unthrottle
  272. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/powercap
  273. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overtemp
  274. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/supply_fault
  275. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/overcurrent
  276. /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
  277. Date: March 2016
  278. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  279. Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
  280. Description: POWERNV CPUFreq driver's frequency throttle stats directory and
  281. attributes
  282. 'cpuX/cpufreq/throttle_stats' directory contains the CPU frequency
  283. throttle stat attributes for the chip. The throttle stats of a cpu
  284. is common across all the cpus belonging to a chip. Below are the
  285. throttle attributes exported in the 'throttle_stats' directory:
  286. - turbo_stat : This file gives the total number of times the max
  287. frequency is throttled to lower frequency in turbo (at and above
  288. nominal frequency) range of frequencies.
  289. - sub_turbo_stat : This file gives the total number of times the
  290. max frequency is throttled to lower frequency in sub-turbo(below
  291. nominal frequency) range of frequencies.
  292. - unthrottle : This file gives the total number of times the max
  293. frequency is unthrottled after being throttled.
  294. - powercap : This file gives the total number of times the max
  295. frequency is throttled due to 'Power Capping'.
  296. - overtemp : This file gives the total number of times the max
  297. frequency is throttled due to 'CPU Over Temperature'.
  298. - supply_fault : This file gives the total number of times the
  299. max frequency is throttled due to 'Power Supply Failure'.
  300. - overcurrent : This file gives the total number of times the
  301. max frequency is throttled due to 'Overcurrent'.
  302. - occ_reset : This file gives the total number of times the max
  303. frequency is throttled due to 'OCC Reset'.
  304. The sysfs attributes representing different throttle reasons like
  305. powercap, overtemp, supply_fault, overcurrent and occ_reset map to
  306. the reasons provided by OCC firmware for throttling the frequency.
  307. What: /sys/devices/system/cpu/cpufreq/policyX/throttle_stats
  308. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/turbo_stat
  309. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/sub_turbo_stat
  310. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/unthrottle
  311. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/powercap
  312. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overtemp
  313. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/supply_fault
  314. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/overcurrent
  315. /sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
  316. Date: March 2016
  317. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  318. Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
  319. Description: POWERNV CPUFreq driver's frequency throttle stats directory and
  320. attributes
  321. 'policyX/throttle_stats' directory and all the attributes are same as
  322. the /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats directory and
  323. attributes which give the frequency throttle information of the chip.
  324. What: /sys/devices/system/cpu/cpuX/regs/
  325. /sys/devices/system/cpu/cpuX/regs/identification/
  326. /sys/devices/system/cpu/cpuX/regs/identification/midr_el1
  327. /sys/devices/system/cpu/cpuX/regs/identification/revidr_el1
  328. Date: June 2016
  329. Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
  330. Description: AArch64 CPU registers
  331. 'identification' directory exposes the CPU ID registers for
  332. identifying model and revision of the CPU.
  333. What: /sys/devices/system/cpu/cpu#/cpu_capacity
  334. Date: December 2016
  335. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  336. Description: information about CPUs heterogeneity.
  337. cpu_capacity: capacity of cpu#.
  338. What: /sys/devices/system/cpu/vulnerabilities
  339. /sys/devices/system/cpu/vulnerabilities/meltdown
  340. /sys/devices/system/cpu/vulnerabilities/spectre_v1
  341. /sys/devices/system/cpu/vulnerabilities/spectre_v2
  342. Date: January 2018
  343. Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
  344. Description: Information about CPU vulnerabilities
  345. The files are named after the code names of CPU
  346. vulnerabilities. The output of those files reflects the
  347. state of the CPUs in the system. Possible output values:
  348. "Not affected" CPU is not affected by the vulnerability
  349. "Vulnerable" CPU is affected and no mitigation in effect
  350. "Mitigation: $M" CPU is affected and mitigation $M is in effect