Skip to content

v5 multi-die/package topology support

Len Brown linux-doc linux-hwmon linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22x86 topology: Fix doc typoDocumentation/x86/topology.txt+1 -10 replies
2/22topology: Simplify cputopology.txt formatting and wordingDocumentation/cputopology.txt+23 -230 replies
3/22x86 smpboot: Rename match_die() to match_pkg()arch/x86/kernel/smpboot.c+3 -30 replies
4/22x86 topology: Add CPUID.1F multi-die/package supportDocumentation/x86/topology.txt arch/x86/include/asm/processor.h arch/x86/kernel/cpu/topology.c +1 more+75 -200 replies
5/22x86 topology: Create topology_max_die_per_package()arch/x86/include/asm/processor.h arch/x86/include/asm/topology.h arch/x86/kernel/cpu/topology.c+14 -20 replies
6/22cpu topology: Export die_idDocumentation/cputopology.txt drivers/base/topology.c include/linux/topology.h+19 -30 replies
7/22x86 topology: Define topology_die_id()arch/x86/include/asm/topology.h+1 -00 replies
8/22x86 topology: Define topology_logical_die_id()arch/x86/include/asm/processor.h arch/x86/include/asm/topology.h arch/x86/kernel/cpu/common.c +1 more+52 -00 replies
9/22powercap/intel_rapl: Simplify rapl_find_package()drivers/powercap/intel_rapl.c+9 -90 replies
10/22powercap/intel_rapl: Support multi-die/packagedrivers/powercap/intel_rapl.c+2 -22 replies
11/22thermal/x86_pkg_temp_thermal: Support multi-die/packagedrivers/thermal/intel/x86_pkg_temp_thermal.c+4 -40 replies
12/22powercap/intel_rapl: update rapl domain name and debug messagesdrivers/powercap/intel_rapl.c+32 -250 replies
13/22hwmon/coretemp: Support multi-die/packagedrivers/hwmon/coretemp.c+4 -40 replies
14/22topology: Create package_cpus sysfs attributeDocumentation/cputopology.txt drivers/base/topology.c+12 -60 replies
15/22topology: Create core_cpus and die_cpus sysfs attributesDocumentation/cputopology.txt arch/x86/include/asm/smp.h arch/x86/include/asm/topology.h +4 more+55 -60 replies
16/22perf/x86/intel/uncore: Support multi-die/packagearch/x86/events/intel/uncore.c+11 -94 replies
17/22perf/x86/intel/rapl: Support multi-die/packagearch/x86/events/intel/rapl.c+5 -50 replies
18/22perf/x86/intel/cstate: Support multi-die/packagearch/x86/events/intel/cstate.c+10 -40 replies
19/22thermal/x86_pkg_temp_thermal: rename internal variables to zones from packagesdrivers/thermal/intel/x86_pkg_temp_thermal.c+72 -700 replies
20/22hwmon/coretemp: rename internal variables to zones from packagesdrivers/hwmon/coretemp.c+18 -180 replies
21/22perf/x86/intel/uncore: renames in response to multi-die/pkg supportarch/x86/events/intel/uncore.c arch/x86/events/intel/uncore.h arch/x86/events/intel/uncore_snbep.c+40 -402 replies
22/22perf/x86/intel/rapl: rename internal variables in response to multi-die/pkg supportarch/x86/events/intel/rapl.c+2 -22 replies

Reviews trailers per patch

4 of 22 patches have a Reviewed-by or Acked-by.

PatchRafael J. WysockiGuenter RoeckZhang RuiLen Brown
1/22
2/22
3/22
4/22
5/22
6/22
7/22
8/22T-b
9/22A-b
10/22A-b
11/22
12/22A-b
13/22A-b
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22Originally-by
22/22Originally-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/22] v5 multi-die/package topology support

This patch series does 4 things.

1. Parse the new CPUID.1F leaf to discover multi-die/package topology

2. Export multi-die topology inside the kernel

3. Update 4 places (coretemp, pkgtemp, rapl, perf) that that need to know the difference between die and package-scope MSR.

4. Export multi-die topology to user-space via sysfs

These changes should have 0 impact on cache topology, NUMA topology, Linux scheduler, or system performance.

These topology changes primarily impact parts of the kernel and some applications that care about package MSR scope. Also, some software is licensed per package, and other tools, such as benchmark reporting software sometimes cares about packages.

---
Updates since v4

[PATCH 13/22] hwmon/coretemp: Support multi-die/package

Removed a dead line that should have gone away in the v3 cpuinfo_x86 cleanup suggested by tglx.

[PATCH 19/22] thermal/x86_pkg_temp_thermal: rename internal variables to zones from packages [PATCH 20/22] hwmon/coretemp: rename internal variables to zones from packages [PATCH 21/22] perf/x86/intel/uncore: renames in response to multi-die/pkg support [PATCH 22/22] perf/x86/intel/rapl: rename internal variables in response to multi-die/pkg support

New syntax-only patches to clean up in-consistent variable names resulting from previous patches. Suggested by ingo.

---
Updates since v2:

In response to brice, peterz and Morten Rasmussen,
used the word "cpu" rather than "thread" for the new sysfs attributes.

In response to tglx, replaced access to cpuinfo_x86.x86_max_dies, with macro topology_max_die_per_package(). In doing so, deleted this new per-cpu field entirely, as a global is sufficient.

Also, appended 3 patches from Kan Liang, updating the perf code to be multi-die aware. These patches are similar to the preceding power and temperature patches. I believe that with these patches, this series now includes all needed multi-die kernel support.

---
The following changes since commit 085b7755808aa11f78ab9377257e1dad2e6fa4bb:

Linux 5.1-rc6 (2019-04-21 10:45:57 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git x86

for you to fetch changes up to 9f57786ba08d4d5e913cd21693aadb0ccdba72b2:

perf/x86/intel/rapl: rename internal variables in response to multi-die/pkg support (2019-05-06 17:17:58 -0400)

----------------------------------------------------------------
Kan Liang (3):
perf/x86/intel/uncore: Support multi-die/package perf/x86/intel/rapl: Support multi-die/package perf/x86/intel/cstate: Support multi-die/package

Len Brown (14):
x86 topology: Fix doc typo
topology: Simplify cputopology.txt formatting and wording
x86 smpboot: Rename match_die() to match_pkg()
x86 topology: Add CPUID.1F multi-die/package support
x86 topology: Create topology_max_die_per_package()
cpu topology: Export die_id
x86 topology: Define topology_die_id()
x86 topology: Define topology_logical_die_id()
topology: Create package_cpus sysfs attribute
topology: Create core_cpus and die_cpus sysfs attributes thermal/x86_pkg_temp_thermal: rename internal variables to zones from packages hwmon/coretemp: rename internal variables to zones from packages perf/x86/intel/uncore: renames in response to multi-die/pkg support perf/x86/intel/rapl: rename internal variables in response to multi-die/pkg support

Zhang Rui (5):
powercap/intel_rapl: Simplify rapl_find_package() powercap/intel_rapl: Support multi-die/package thermal/x86_pkg_temp_thermal: Support multi-die/package powercap/intel_rapl: update rapl domain name and debug messages hwmon/coretemp: Support multi-die/package

 Documentation/cputopology.txt                |  80 +++++++++------
 Documentation/x86/topology.txt               |   6 +-
 arch/x86/events/intel/cstate.c               |  14 ++-
 arch/x86/events/intel/rapl.c                 |  12 +--
 arch/x86/events/intel/uncore.c               |  80 +++++++--------
 arch/x86/events/intel/uncore.h               |   4 +-
 arch/x86/events/intel/uncore_snbep.c         |   2 +-
 arch/x86/include/asm/processor.h             |   4 +-
 arch/x86/include/asm/smp.h                   |   1 +
 arch/x86/include/asm/topology.h              |  17 ++++
 arch/x86/kernel/cpu/common.c                 |   1 +
 arch/x86/kernel/cpu/topology.c               |  88 +++++++++++++----
 arch/x86/kernel/smpboot.c                    |  75 +++++++++++++-
 arch/x86/xen/smp_pv.c                        |   1 +
 drivers/base/topology.c                      |  22 +++++
 drivers/hwmon/coretemp.c                     |  36 +++----
 drivers/powercap/intel_rapl.c                |  75 +++++++-------
 drivers/thermal/intel/x86_pkg_temp_thermal.c | 142 ++++++++++++++-------------
 include/linux/topology.h                     |   6 ++
 19 files changed, 437 insertions(+), 229 deletions(-)