Skip to content

Fix NUMA sched domain build errors for GNR and CWF

Tim Chen lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 1 replyIn review
  2. v42 patches 5 repliesSuperseded
  3. v32 patches 15 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches2 repliesSuperseded
v12 patches11 repliesSuperseded

Changes in v5 from the cover letter

- Reise detection of arch_sched_node_distance() replacement with a
cleaner implementtion.
- Link to v4: https://lore.kernel.org/lkml/[email protected]/

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sched: Create architecture specific sched domain distancesinclude/linux/sched/topology.h kernel/sched/topology.c+87 -220 replies
2/2sched/topology: Fix sched domain build error for GNR, CWF in SNC-3 modearch/x86/kernel/smpboot.c+70 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChen YuZhao Liu
1/2R-b
2/2R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/2] Fix NUMA sched domain build errors for GNR and CWF

While testing Granite Rapids (GNR) and Clearwater Forest (CWF) systems in SNC-3 mode, we encountered sched domain build errors in dmesg. The scheduler domain code did not expect asymmetric node distances from a local node to multiple nodes in a remote package. As a result, remote nodes ended up being grouped partially with local nodes with asymemtric groupings, and creating too many levels in the NUMA sched domain hierarchy.

To address this, we simplify remote node distances for the purpose of sched domain construction on GNR and CWF. Specifically, we replace the individual distances to nodes within the same remote package with their average distance. This resolves the domain build errors and reduces the number of NUMA sched domain levels.

The actual SLIT NUMA node distances are still preserved separately, in case they are needed when building sched domains. NUMA balancing continues to use the true distances when selecting a closer remote node for a task’s numa_group.

This version also revises the detection of arch_sched_node_distance() substitution with a cleaner implementation, thanks to Chen Yu’s suggestion. Much appreciation as well to Pratek for reviewing earlier versions. Pratek, if this revision looks good to you, please consider adding your Reviewed-by.

Thanks,
Tim

Changes in v5:
- Reise detection of arch_sched_node_distance() replacement with a
cleaner implementtion.
- Link to v4: https://lore.kernel.org/lkml/[email protected]/

Changes in v4:
- Move average node distance computation to x86 specific code
- Put all the changes under CONFIG_NUMA.
- Use __free() to simplify code.
- Allocate separate distance array only if node distances are modified.
- Assert that we don't have more than 2 packages for GNR/CWF when replacing remote node distances with average remote node distance.
- Comments and code style clean ups.
- Link to v3:
https://lore.kernel.org/lkml/[email protected]/

Changes in v3:
- Simplify sched_record_numa_dist() by getting rid of max distance computation.
- minor clean ups.
- Link to v2:
https://lore.kernel.org/lkml/61a6adbb845c148361101e16737307c8aa7ee362.1757097030.git.tim.c.chen@linux.intel.com/

Changes in v2:
- Allow modification of NUMA distances by architecture to be the
sched domain NUMA distances for building sched domains to
simplify NUMA domains.
Maintain separate NUMA distances for the purpose of building
sched domains from actual NUMA distances.
- Use average remote node distance as the distance to nodes in remote packages for GNR and CWF.
- Remove the original fix for topology_span_sane() that's superseded
by better fix from Pratek.
https://lore.kernel.org/lkml/175688671425.1920.13690753997160836570.tip-bot2@tip-bot2/.
- Link to v1: https://lore.kernel.org/lkml/[email protected]/

Tim Chen (2):
sched: Create architecture specific sched domain distances sched/topology: Fix sched domain build error for GNR, CWF in SNC-3
mode

 arch/x86/kernel/smpboot.c      |  70 +++++++++++++++++++++
 include/linux/sched/topology.h |   1 +
 kernel/sched/topology.c        | 108 ++++++++++++++++++++++++++-------
 3 files changed, 157 insertions(+), 22 deletions(-)
Signature · 1 line
2.32.0