All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Michal Orzel <michal.orzel@amd.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH for-4.22 5/5] xen/numa: fix setup of non-aligned memory affinity ranges
Date: Mon, 1 Jun 2026 19:20:27 +0200	[thread overview]
Message-ID: <ah2_Wyzw486gLflv@macbook.local> (raw)
In-Reply-To: <e08a1e30-cac2-40a6-9dbc-31aa4074ae88@citrix.com>

On Mon, Jun 01, 2026 at 06:08:49PM +0100, Andrew Cooper wrote:
> On 01/06/2026 4:43 pm, Roger Pau Monne wrote:
> > diff --git a/xen/common/numa.c b/xen/common/numa.c
> > index 8544a1598218..8b2f29597f30 100644
> > --- a/xen/common/numa.c
> > +++ b/xen/common/numa.c
> > @@ -396,7 +396,13 @@ static int __init populate_memnodemap(const struct node *nodes,
> >  
> >      for ( i = 0; i < numnodes; i++ )
> >      {
> > -        unsigned long spdx = paddr_to_pdx(nodes[i].start);
> > +        /*
> > +         * Round down start address: if start is not aligned to the memnodemap
> > +         * chunk size the tail remainder might not be added.  Overlaps created
> > +         * by rounding will fall into the same NUMA region.
> > +         */
> > +        unsigned long spdx = ROUNDDOWN(paddr_to_pdx(nodes[i].start),
> > +                                       1UL << shift);
> >          unsigned long epdx = paddr_to_pdx(nodes[i].end - 1);
> >  
> >          if ( spdx > epdx )
> 
> I like that this comes with a unit test, but this hunk needs to be
> standalone at the start of the series, because it needs backporting.

I was supposed to add a post-commit note about this, but finding the
offending commit took me a lot more time than I was expecting and
forgot to add the note.

Yes, this needs to be backported.  I was wondering whether it would be
fine to just backport the fix, leaving the test changes alone.  But I
can also split this to a pre-commit.

Thanks, Roger.


  reply	other threads:[~2026-06-01 17:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 15:43 [PATCH for-4.22 0/5] numa: add unit testing plus fix regression Roger Pau Monne
2026-06-01 15:43 ` [PATCH for-4.22 1/5] tools/bitops: adjust bitmap_or() interface to match hypervisor Roger Pau Monne
2026-06-03 14:34   ` Anthony PERARD
2026-06-03 19:03     ` Roger Pau Monné
2026-06-01 15:43 ` [PATCH for-4.22 2/5] tools/macros: adjust ROUNDUP() " Roger Pau Monne
2026-06-03 15:15   ` Anthony PERARD
2026-06-01 15:43 ` [PATCH for-4.22 3/5] xen/numa: prepare NUMA setup code for unit testing Roger Pau Monne
2026-06-03  8:27   ` Jan Beulich
2026-06-01 15:43 ` [PATCH for-4.22 4/5] tests/numa: add unit tests for NUMA setup logic Roger Pau Monne
2026-06-03  8:38   ` Jan Beulich
2026-06-03 13:45     ` Roger Pau Monné
2026-06-03 13:54       ` Jan Beulich
2026-06-03 14:07         ` Roger Pau Monné
2026-06-01 15:43 ` [PATCH for-4.22 5/5] xen/numa: fix setup of non-aligned memory affinity ranges Roger Pau Monne
2026-06-01 17:08   ` Andrew Cooper
2026-06-01 17:20     ` Roger Pau Monné [this message]
2026-06-02 10:26       ` Jan Beulich
2026-06-03  8:53   ` Jan Beulich
2026-06-03  8:54     ` Jan Beulich
2026-06-03 13:52       ` Roger Pau Monné
2026-06-02  7:23 ` [PATCH for-4.22 0/5] numa: add unit testing plus fix regression Oleksii Kurochko

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=ah2_Wyzw486gLflv@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.