public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Chen, Yu C" <yu.c.chen@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
	Ingo Molnar <mingo@kernel.org>,
	Doug Nelson <doug.nelson@intel.com>,
	Mohini Narkhede <mohini.narkhede@intel.com>,
	linux-kernel@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Subject: Re: [RESEND PATCH] sched/fair: Skip sched_balance_running cmpxchg when balance is not due
Date: Tue, 14 Oct 2025 11:26:14 +0200	[thread overview]
Message-ID: <20251014092614.GL4067720@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <49dba7ff-8be6-40cf-9aa7-b0a5cb2f77c3@intel.com>

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.

  parent reply	other threads:[~2025-10-14  9:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 23:00 [RESEND PATCH] sched/fair: Skip sched_balance_running cmpxchg when balance is not due Tim Chen
2025-10-03  5:23 ` Shrikanth Hegde
2025-10-03 16:37   ` Tim Chen
2025-10-13 14:26 ` Peter Zijlstra
2025-10-13 16:32   ` Chen, Yu C
2025-10-13 16:41     ` Shrikanth Hegde
2025-10-13 16:43       ` Chen, Yu C
2025-10-14  9:26     ` Peter Zijlstra [this message]
2025-10-13 21:54   ` Tim Chen
2025-10-14  9:24     ` Peter Zijlstra
2025-10-14  9:33       ` Shrikanth Hegde
2025-10-14  9:42         ` Peter Zijlstra
2025-10-14  9:51           ` Shrikanth Hegde
2025-10-16 14:03           ` Shrikanth Hegde
2025-10-22 17:42             ` Shrikanth Hegde
2025-10-14 13:50       ` Srikar Dronamraju
2025-10-14 13:59         ` Peter Zijlstra
2025-10-14 14:28       ` Shrikanth Hegde
2025-10-14 18:05       ` Tim Chen

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=20251014092614.GL4067720@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=doug.nelson@intel.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mohini.narkhede@intel.com \
    --cc=sshegde@linux.ibm.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=yu.c.chen@intel.com \
    /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