mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Justin He <Justin.He@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: percpu: Introduce normalized CPU-to-NUMA node mapping to  reduce max_distance
Date: Mon, 28 Jul 2025 06:28:12 +0200	[thread overview]
Message-ID: <2025072834-getaway-fling-0d66@gregkh> (raw)
In-Reply-To: <AS2PR08MB978689001CDED54ABD33FAF7F75AA@AS2PR08MB9786.eurprd08.prod.outlook.com>

On Mon, Jul 28, 2025 at 02:54:42AM +0000, Justin He wrote:
> Hi Greg
> 
> > -----Original Message-----
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Sent: Tuesday, July 22, 2025 1:45 PM
> > To: Justin He <Justin.He@arm.com>
> > Cc: Rafael J. Wysocki <rafael@kernel.org>; Danilo Krummrich
> > <dakr@kernel.org>; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH] mm: percpu: Introduce normalized CPU-to-NUMA node

Odd quoting, please fix your email client :(

> > > In this configuration, pcpu_embed_first_chunk() computes a large
> > > max_distance:
> > > percpu: max_distance=0x5fffbfac0000 too large for vmalloc space
> > > 0x7bff70000000
> > >
> > > As a result, the allocator falls back to pcpu_page_first_chunk(),
> > > which uses page-by-page allocation with nr_groups = 1, leading to
> > > degraded performance.
> > 
> > But that's intentional, you don't want to go across the nodes, right?
> My intention is to 

Did something get dropped?

> > > This patch introduces a normalized CPU-to-NUMA node mapping to
> > > mitigate the issue. Distances of 10 and 16 are treated as local
> > > (LOCAL_DISTANCE),
> > 
> > Why?  What is this going to now break on those systems that assumed that
> > those were NOT local?
> The normalization only affects percpu allocations - possibly only dynamic ones. 

"possibly" doesn't instill much confidence here...

> Other mechanisms, such as cpu_to_node_map, remain unaffected and continue
> to function as before in those contexts.

percpu allocations are the "hottest" path we have, so without testing
this on systems that were working well before your change, I don't think
we could ever accept this, right?

> > What did you test this on?
> > 
> This was conducted on an Arm64 N2 server with 256 CPUs and 64 GB of memory.
>  (Apologies, but I am not authorized to disclose the exact hardware specifications.)

That's fine, but why didn't you test this on older systems that this
code was originally written for?  You don't want to have regressions on
them, right?

thanks,

greg k-h

  reply	other threads:[~2025-07-28  4:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22  4:14 Jia He
2025-07-22  5:45 ` Greg Kroah-Hartman
2025-07-28  2:54   ` Justin He
2025-07-28  4:28     ` Greg Kroah-Hartman [this message]
2025-07-28  6:14       ` Justin He
2025-07-22 21:40 ` kernel test robot
2025-07-26 12:27 ` kernel test robot

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=2025072834-getaway-fling-0d66@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Justin.He@arm.com \
    --cc=dakr@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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

all inboxes | Powered by JetHome®