Linux CXL
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Alison Schofield <alison.schofield@intel.com>, <x86@kernel.org>,
	<linux-cxl@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>,
	Mike Rapoport <rppt@kernel.org>
Subject: RE: [PATCH 0/2] x86/numa: Fix NUMA node overlap & init failure
Date: Thu, 25 Jan 2024 13:49:08 -0800	[thread overview]
Message-ID: <65b2d754128f0_37ad29453@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <65a1bce74f420_3b8e2942@dwillia2-xfh.jf.intel.com.notmuch>

Dan Williams wrote:
> alison.schofield@ wrote:
> > 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(-)
> 
> For both fixes:
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> 
> ...if they get picked up into the x86 tree.
> 
> Otherwise I'll circle back and take them through cxl.git with an x86 ack
> since this is all cxl-related fixups to numa_fill_memblks().

Circling back to check on these now that Mike has acked the memblock usage.
Dave or Peter, please pull them into tip/x86/mm, or I can circle back and grab
them next week.

  reply	other threads:[~2024-01-25 21:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-01-29 23:00     ` Dave Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65b2d754128f0_37ad29453@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox