From: Jianyong Wu <wujianyong@hygon.cn>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"jianyong.wu@outlook.com" <jianyong.wu@outlook.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] SCHED: scatter nohz idle balance target cpus
Date: Tue, 18 Mar 2025 11:35:40 +0000 [thread overview]
Message-ID: <5cb53e48ade14fbaab3e2940df7ed0d5@hygon.cn> (raw)
In-Reply-To: <20250318063847.GA25930@noisy.programming.kicks-ass.net>
Hi Peter,
Thanks for replay.
> -----Original Message-----
> From: Peter Zijlstra <peterz@infradead.org>
> Sent: Tuesday, March 18, 2025 2:39 PM
> To: Jianyong Wu <wujianyong@hygon.cn>
> Cc: mingo@redhat.com; vincent.guittot@linaro.org; jianyong.wu@outlook.com;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] SCHED: scatter nohz idle balance target cpus
>
> On Tue, Mar 18, 2025 at 02:23:58AM +0000, Jianyong Wu wrote:
>
> Re subject; if you look at other patches for sched, you'll note that we do not
> capitalize it.
[Jianyong Wu]
OK, will correct it.
> Also, what you're doing is not scatter, it is rotation.
[Jianyong Wu]
It seems. However, as nohz idle balance occurs quite frequently, in proportion to the value of "HZ" and CPUs number, the selected CPU will spread to the whole system soon. Compared with current situation where mostly only cpu0 is selected, the change in this patch is more like a "scattering" effect. But it doesn't matter, "rotation" is fine. I can change it according your wish.
>
> > Currently, cpu selection logic for nohz idle balance lacks history
> > info that leads to cpu0 is always chosen if it's in nohz cpu mask.
> > It's not fair fot the tasks reside in numa node0. It's worse in the
> > machine with large cpu number, nohz idle balance may be very heavy.
>
> Since you seem to care about ilb and numa; there is this _very_ old patch set
> that never got finished:
>
> https://lore.kernel.org/all/20091211013056.305998000@intel.com/
>
[Jianyong Wu]
Thanks for this. I'll look into it (may take some time)
> IIRC there was a problem where it would simply stop running the per-node ilb
> when the node went idle, leading to node level imbalances. This should be
> curable by picking one such idle node and keeping its ILB active or somesuch.
[Jianyong Wu]
I think this patch is simple enough to achieve the "fairness". WDYT?
>
> Something to poke at if you're interested..
>
next prev parent reply other threads:[~2025-03-18 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 2:23 [PATCH] SCHED: scatter nohz idle balance target cpus Jianyong Wu
2025-03-18 6:38 ` Peter Zijlstra
2025-03-18 11:35 ` Jianyong Wu [this message]
2025-03-19 8:45 ` Vincent Guittot
2025-03-19 9:03 ` Jianyong Wu
2025-03-19 9:26 ` Vincent Guittot
2025-03-19 9:42 ` Jianyong Wu
2025-03-19 9:55 ` Vincent Guittot
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=5cb53e48ade14fbaab3e2940df7ed0d5@hygon.cn \
--to=wujianyong@hygon.cn \
--cc=jianyong.wu@outlook.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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