mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
topology: Simplify cputopology.txt formatting and wording
Syntax only, no functional or semantic change. Signed-off-by: Len Brown <len.brown@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1ca56f8ea922a67f0017bd645912ea02a65a85ec.1551160674.git.len.brown@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
ef7c7727f2
commit
3a1c779fb8
@ -3,79 +3,79 @@ How CPU topology info is exported via sysfs
|
|||||||
===========================================
|
===========================================
|
||||||
|
|
||||||
Export CPU topology info via sysfs. Items (attributes) are similar
|
Export CPU topology info via sysfs. Items (attributes) are similar
|
||||||
to /proc/cpuinfo output of some architectures:
|
to /proc/cpuinfo output of some architectures. They reside in
|
||||||
|
/sys/devices/system/cpu/cpuX/topology/:
|
||||||
|
|
||||||
1) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
|
physical_package_id:
|
||||||
|
|
||||||
physical package id of cpuX. Typically corresponds to a physical
|
physical package id of cpuX. Typically corresponds to a physical
|
||||||
socket number, but the actual value is architecture and platform
|
socket number, but the actual value is architecture and platform
|
||||||
dependent.
|
dependent.
|
||||||
|
|
||||||
2) /sys/devices/system/cpu/cpuX/topology/core_id:
|
core_id:
|
||||||
|
|
||||||
the CPU core ID of cpuX. Typically it is the hardware platform's
|
the CPU core ID of cpuX. Typically it is the hardware platform's
|
||||||
identifier (rather than the kernel's). The actual value is
|
identifier (rather than the kernel's). The actual value is
|
||||||
architecture and platform dependent.
|
architecture and platform dependent.
|
||||||
|
|
||||||
3) /sys/devices/system/cpu/cpuX/topology/book_id:
|
book_id:
|
||||||
|
|
||||||
the book ID of cpuX. Typically it is the hardware platform's
|
the book ID of cpuX. Typically it is the hardware platform's
|
||||||
identifier (rather than the kernel's). The actual value is
|
identifier (rather than the kernel's). The actual value is
|
||||||
architecture and platform dependent.
|
architecture and platform dependent.
|
||||||
|
|
||||||
4) /sys/devices/system/cpu/cpuX/topology/drawer_id:
|
drawer_id:
|
||||||
|
|
||||||
the drawer ID of cpuX. Typically it is the hardware platform's
|
the drawer ID of cpuX. Typically it is the hardware platform's
|
||||||
identifier (rather than the kernel's). The actual value is
|
identifier (rather than the kernel's). The actual value is
|
||||||
architecture and platform dependent.
|
architecture and platform dependent.
|
||||||
|
|
||||||
5) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
|
thread_siblings:
|
||||||
|
|
||||||
internal kernel map of cpuX's hardware threads within the same
|
internal kernel map of cpuX's hardware threads within the same
|
||||||
core as cpuX.
|
core as cpuX.
|
||||||
|
|
||||||
6) /sys/devices/system/cpu/cpuX/topology/thread_siblings_list:
|
thread_siblings_list:
|
||||||
|
|
||||||
human-readable list of cpuX's hardware threads within the same
|
human-readable list of cpuX's hardware threads within the same
|
||||||
core as cpuX.
|
core as cpuX.
|
||||||
|
|
||||||
7) /sys/devices/system/cpu/cpuX/topology/core_siblings:
|
core_siblings:
|
||||||
|
|
||||||
internal kernel map of cpuX's hardware threads within the same
|
internal kernel map of cpuX's hardware threads within the same
|
||||||
physical_package_id.
|
physical_package_id.
|
||||||
|
|
||||||
8) /sys/devices/system/cpu/cpuX/topology/core_siblings_list:
|
core_siblings_list:
|
||||||
|
|
||||||
human-readable list of cpuX's hardware threads within the same
|
human-readable list of cpuX's hardware threads within the same
|
||||||
physical_package_id.
|
physical_package_id.
|
||||||
|
|
||||||
9) /sys/devices/system/cpu/cpuX/topology/book_siblings:
|
book_siblings:
|
||||||
|
|
||||||
internal kernel map of cpuX's hardware threads within the same
|
internal kernel map of cpuX's hardware threads within the same
|
||||||
book_id.
|
book_id.
|
||||||
|
|
||||||
10) /sys/devices/system/cpu/cpuX/topology/book_siblings_list:
|
book_siblings_list:
|
||||||
|
|
||||||
human-readable list of cpuX's hardware threads within the same
|
human-readable list of cpuX's hardware threads within the same
|
||||||
book_id.
|
book_id.
|
||||||
|
|
||||||
11) /sys/devices/system/cpu/cpuX/topology/drawer_siblings:
|
drawer_siblings:
|
||||||
|
|
||||||
internal kernel map of cpuX's hardware threads within the same
|
internal kernel map of cpuX's hardware threads within the same
|
||||||
drawer_id.
|
drawer_id.
|
||||||
|
|
||||||
12) /sys/devices/system/cpu/cpuX/topology/drawer_siblings_list:
|
drawer_siblings_list:
|
||||||
|
|
||||||
human-readable list of cpuX's hardware threads within the same
|
human-readable list of cpuX's hardware threads within the same
|
||||||
drawer_id.
|
drawer_id.
|
||||||
|
|
||||||
To implement it in an architecture-neutral way, a new source file,
|
Architecture-neutral, drivers/base/topology.c, exports these attributes.
|
||||||
drivers/base/topology.c, is to export the 6 to 12 attributes. The book
|
However, the book and drawer related sysfs files will only be created if
|
||||||
and drawer related sysfs files will only be created if CONFIG_SCHED_BOOK
|
CONFIG_SCHED_BOOK and CONFIG_SCHED_DRAWER are selected, respectively.
|
||||||
and CONFIG_SCHED_DRAWER are selected.
|
|
||||||
|
|
||||||
CONFIG_SCHED_BOOK and CONFIG_DRAWER are currently only used on s390, where
|
CONFIG_SCHED_BOOK and CONFIG_SCHED_DRAWER are currently only used on s390,
|
||||||
they reflect the cpu and cache hierarchy.
|
where they reflect the cpu and cache hierarchy.
|
||||||
|
|
||||||
For an architecture to support this feature, it must define some of
|
For an architecture to support this feature, it must define some of
|
||||||
these macros in include/asm-XXX/topology.h::
|
these macros in include/asm-XXX/topology.h::
|
||||||
@ -98,10 +98,10 @@ To be consistent on all architectures, include/linux/topology.h
|
|||||||
provides default definitions for any of the above macros that are
|
provides default definitions for any of the above macros that are
|
||||||
not defined by include/asm-XXX/topology.h:
|
not defined by include/asm-XXX/topology.h:
|
||||||
|
|
||||||
1) physical_package_id: -1
|
1) topology_physical_package_id: -1
|
||||||
2) core_id: 0
|
2) topology_core_id: 0
|
||||||
3) sibling_cpumask: just the given CPU
|
3) topology_sibling_cpumask: just the given CPU
|
||||||
4) core_cpumask: just the given CPU
|
4) topology_core_cpumask: just the given CPU
|
||||||
|
|
||||||
For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
|
For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
|
||||||
default definitions for topology_book_id() and topology_book_cpumask().
|
default definitions for topology_book_id() and topology_book_cpumask().
|
||||||
|
Loading…
Reference in New Issue
Block a user