Linux CXL
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/numa: Fix NUMA node overlap & init failure
@ 2024-01-12 20:09 alison.schofield
  2024-01-12 20:09 ` [PATCH 1/2] x86/numa: Fix the address overlap check in numa_fill_memblks() alison.schofield
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: alison.schofield @ 2024-01-12 20:09 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Andy Lutomirski, Peter Zijlstra, Dan Williams,
	Mike Rapoport
  Cc: Alison Schofield, x86, linux-cxl

From: Alison Schofield <alison.schofield@intel.com>

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/20240102213206.1493733-1-alison.schofield@intel.com/

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
-- 
2.37.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-29 23:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-12 20:09 [PATCH 0/2] x86/numa: Fix NUMA node overlap & init failure alison.schofield
2024-01-12 20:09 ` [PATCH 1/2] x86/numa: Fix the address overlap check in numa_fill_memblks() alison.schofield
2024-01-23  8:13   ` Mike Rapoport
2024-01-12 20:09 ` [PATCH 2/2] x86/numa: Fix the sort compare func used " alison.schofield
2024-01-12 22:20   ` Dan Williams
2024-01-13  0:35     ` Alison Schofield
2024-01-13  1:54       ` Dan Williams
2024-01-12 22:27 ` [PATCH 0/2] x86/numa: Fix NUMA node overlap & init failure Dan Williams
2024-01-25 21:49   ` Dan Williams
2024-01-29 23:00     ` Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox