Skip to content

powerpc/numa: Enable coregroup support for shared LPARs

Srikar Dronamraju linuxppc-dev lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7powerpc/numa: Remove redundant coregroup enablementarch/powerpc/mm/numa.c+3 -100 replies
2/7powerpc/numa: Consolidate VPHN associativity lookuparch/powerpc/mm/numa.c+5 -490 replies
3/7powerpc/numa: Factor out coregroup availability checkarch/powerpc/mm/numa.c+11 -20 replies
4/7powerpc/numa: Allow coregroup detection when NUMA is disabledarch/powerpc/mm/numa.c+6 -60 replies
5/7powerpc/numa: Consolidate associativity lookup in parse_numa_propertiesarch/powerpc/mm/numa.c+16 -150 replies
6/7powerpc/numa: Extract CPU associativity processing into separate functionarch/powerpc/mm/numa.c+36 -290 replies
7/7powerpc/numa: Enable coregroup support for shared LPARsarch/powerpc/include/asm/topology.h arch/powerpc/kernel/smp.c arch/powerpc/mm/numa.c +1 more+26 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] powerpc/numa: Enable coregroup support for shared LPARs

Coregroup topology is currently disabled for shared LPARs even when coregroup information is available through the associativity hierarchy.

The associativity hierarchy differs between shared and dedicated LPARs. For dedicated LPARs, a coregroup level is present when the hierarchy extends beyond primary_domain_index + 1. For shared LPARs, the hierarchy has one fewer level and coregroup information is available when it extends beyond primary_domain_index.

The processor sharing mode is not known when NUMA properties are initially parsed. It is determined later in pSeries_setup_arch(). CPU associativity therefore initially uses the dedicated-LPAR interpretation. Once shared processor mode is known, reprocess CPU associativity to detect the coregroup level using the shared-LPAR hierarchy.

The series also separates coregroup discovery from NUMA enablement. CPU associativity is processed even with numa=disabled, while NUMA node, memory and PCI processing remain disabled.

Patches 1-3 prepare the coregroup detection code by removing redundant coregroup detection, consolidating the VPHN associativity lookup, and factoring out the coregroup-level check.

Patches 4-6 allow coregroup discovery with NUMA disabled and restructure CPU associativity processing so that it can be reused after processor sharing mode is known.

Patch 7 accounts for the shared-LPAR associativity hierarchy and reprocesses CPU associativity after shared processor mode has been identified.

Testing
-------

Tested on:
- Dedicated LPAR
- Shared LPAR
- numa=disabled
- CPU hotplug
- Memory hotplug

On a shared LPAR, /proc/schedstat did not contain an MC domain before the series:

domain0 SMT 00000000,00000000,00000055 ...
domain1 PKG 000000ff,000000ff,000000ff ...
domain2 NUMA ffffffff,ffffffff,ffffffff ...

After the series, an MC domain is present between SMT and PKG:

domain0 SMT 00000000,00000000,00000055 ...
domain1 MC 00000000,00000000,000000ff ...
domain2 PKG 000000ff,000000ff,000000ff ...
domain3 NUMA ffffffff,ffffffff,ffffffff ...

Srikar Dronamraju (7):
powerpc/numa: Remove redundant coregroup enablement powerpc/numa: Consolidate VPHN associativity lookup powerpc/numa: Factor out coregroup availability check powerpc/numa: Allow coregroup detection when NUMA is disabled powerpc/numa: Consolidate associativity lookup in parse_numa_properties powerpc/numa: Extract CPU associativity processing into separate function powerpc/numa: Enable coregroup support for shared LPARs

 arch/powerpc/include/asm/topology.h    |   2 +
 arch/powerpc/kernel/smp.c              |   4 -
 arch/powerpc/mm/numa.c                 | 176 +++++++++++--------------
 arch/powerpc/platforms/pseries/setup.c |   6 +
 4 files changed, 83 insertions(+), 105 deletions(-)
Signature · 1 line
2.47.1