Skip to content

x86/numa: Fix NUMA node overlap & init failure

[email protected] linux-cxl 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/numa: Fix the address overlap check in numa_fill_memblks()arch/x86/mm/numa.c include/linux/memblock.h mm/memblock.c+12 -141 reply
2/2x86/numa: Fix the sort compare func used in numa_fill_memblks()arch/x86/mm/numa.c+1 -13 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDan WilliamsMike Rapoport (IBM)Dave Hansen
SeriesR-b A-b
1/2A-b
2/2

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

Read the v1 thread

Cover letter [PATCH 0/2] x86/numa: Fix NUMA node overlap & init failure

From: Alison Schofield <[email protected]>

A previously posted single patch [1] is obsoleted by this set. The feedback from that review is applied and noted in Patch 1.

While trying to attribute a CXL user report to the bad selection of overlapping memblks, as fixed in Patch 1, I found that two issues, in sequence, lead to NUMA Node overlap and NUMA init failure.

An overlapping NUMA node occurs when a non-overlapping memblk is selected to fill (Patch 1), and then a bad sort (Patch 2) puts the memblk with the greater address ahead of the lesser address memblk in the fill list.

It looked like this:

Existing memblks:

	node 6 [mem 0xb90000000-0xc90000000]
	node 7 [mem 0xc90000000-0xd90000000]

Call to numa_fill_memblks(b90000000,c90000000)

Error (Patch 1): collects 2 blks

	blk[0] node 6 [0xb90000000-0xc90000000]
	blk[1] node 7 [0xc90000000-0xd90000000]

Error (Patch 2): bad sort of the 2 blks

	blk[0] node 7 [0xc90000000-0xd90000000]
	blk[1] node 6 [0xb90000000-0xc90000000]

Seals the deal with a bad fill:

	blk[0] node 7 [0xb90000000-0xd90000000]

Boom: numa_clean_meminfo() discovers the overlap in Nodes 6 & 7 and NUMA init fails.

Since the scenario above is not solely attributed to either patch, the story is explicity shared here.

[1] https://lore.kernel.org/linux-cxl/[email protected]/

Alison Schofield (2):
x86/numa: Fix the address overlap check in numa_fill_memblks() x86/numa: Fix the sort compare func used in numa_fill_memblks()

 arch/x86/mm/numa.c       | 21 ++++++++-------------
 include/linux/memblock.h |  2 ++
 mm/memblock.c            |  5 +++--
 3 files changed, 13 insertions(+), 15 deletions(-)

base-commit: bd009225e8cbb6e18ad3389328fa640e4887dd9e

Signature · 1 line
2.37.3