[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251014092614.GL4067720@noisy.programming.kicks-ass.net>
Date: Tue, 14 Oct 2025 11:26:14 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Chen, Yu C" <yu.c.chen@...el.com>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>, Ingo Molnar <mingo@...nel.org>,
Doug Nelson <doug.nelson@...el.com>,
Mohini Narkhede <mohini.narkhede@...el.com>,
linux-kernel@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
K Prateek Nayak <kprateek.nayak@....com>
Subject: Re: [RESEND PATCH] sched/fair: Skip sched_balance_running cmpxchg
when balance is not due
On Tue, Oct 14, 2025 at 12:32:57AM +0800, Chen, Yu C wrote:
> On 10/13/2025 10:26 PM, Peter Zijlstra wrote:
> > On Thu, Oct 02, 2025 at 04:00:12PM -0700, Tim Chen wrote:
> >
> > > During load balancing, balancing at the LLC level and above must be
> > > serialized.
> >
> > I would argue the wording here, there is no *must*, they *are*. Per the
> > current rules SD_NUMA and up get SD_SERIALIZE.
> >
> > This is a *very* old thing, done by Christoph Lameter back when he was
> > at SGI. I'm not sure this default is still valid or not. Someone would
> > have to investigate. An alternative would be moving it into
> > node_reclaim_distance or somesuch.
> >
>
> Do you mean the following:
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 444bdfdab731..436c899d8da2 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1697,11 +1697,16 @@ sd_init(struct sched_domain_topology_level *tl,
> sd->cache_nice_tries = 2;
>
> sd->flags &= ~SD_PREFER_SIBLING;
> - sd->flags |= SD_SERIALIZE;
> if (sched_domains_numa_distance[tl->numa_level] >
> node_reclaim_distance) {
> sd->flags &= ~(SD_BALANCE_EXEC |
> SD_BALANCE_FORK |
> SD_WAKE_AFFINE);
> + /*
> + * Nodes that are far away need to be serialized to
> + * reduce the overhead of long-distance task
> migration
> + * caused by load balancing.
> + */
> + sd->flags |= SD_SERIALIZE;
> }
>
> We can launch some tests to see if removing SD_SERIALIZE would
> bring any impact.
Yeah, something like that. But lets first get this other thing sorted. I
agree that the SD_SERIALIZE thing is in the wrong place.
Powered by blists - more mailing lists