From: Valentin Schneider <vschneid@redhat.com>
To: Adam Li <adamli@os.amperecomputing.com>,
mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org
Cc: dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, cl@linux.com,
frederic@kernel.org, linux-kernel@vger.kernel.org,
patches@amperecomputing.com,
Adam Li <adamli@os.amperecomputing.com>
Subject: Re: [PATCH] sched/nohz: Fix NOHZ imbalance by adding options for ILB CPU
Date: Tue, 19 Aug 2025 16:00:03 +0200 [thread overview]
Message-ID: <xhsmhtt23h0nw.mognet@vschneid-thinkpadt14sgen2i.remote.csb> (raw)
In-Reply-To: <20250819025720.14794-1-adamli@os.amperecomputing.com>
On 19/08/25 02:57, Adam Li wrote:
> A qualified CPU to run NOHZ idle load balancing (ILB) has to be:
> 1) housekeeping CPU in housekeeping_cpumask(HK_TYPE_KERNEL_NOISE)
> 2) and in nohz.idle_cpus_mask
> 3) and idle
> 4) and not current CPU
>
> If most CPUs are in nohz_full CPU list there is few housekeeping CPU left.
> In the worst case if all CPUs are in nohz_full only the boot CPU is used
> for housekeeping. And the housekeeping CPU is usually busier so it will
> be unlikely added to nohz.idle_cpus_mask.
>
> Therefore if there is few housekeeping CPUs, find_new_ilb() may likely
> failed to find any CPU to do NOHZ idle load balancing. Some NOHZ CPUs may
> stay idle while other CPUs are busy.
>
> This patch adds fallback options when looking for ILB CPU if there is
> no CPU meeting above requirements. Then it searches in bellow order:
> 1) Try looking for the first idle housekeeping CPU
> 2) Try looking for the first idle CPU in nohz.idle_cpus_mask if no SMT.
> 3) Select the first housekeeping CPU even if it is busy.
>
> With this patch the NOHZ idle balancing happens more frequently.
>
I'm not understanding why, in the scenarios outlined above, more NOHZ idle
balancing is a good thing.
Considering only housekeeping CPUs, they're all covered by wakeup, periodic
and idle balancing (on top of NOHZ idle balancing when relevant). So if
find_new_ilb() never finds a NOHZ-idle CPU, then that means your HK CPUs
are either always busy or never stopping the tick when going idle, IOW they
always have some work to do within a jiffy boundary.
Am I missing something?
next prev parent reply other threads:[~2025-08-19 14:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 2:57 Adam Li
2025-08-19 14:00 ` Valentin Schneider [this message]
2025-08-20 3:35 ` Adam Li
2025-08-20 8:43 ` Valentin Schneider
2025-08-20 11:05 ` Adam Li
2025-08-20 11:46 ` Valentin Schneider
2025-08-21 11:18 ` Adam Li
2025-08-28 10:56 ` Valentin Schneider
2025-08-28 15:44 ` Christoph Lameter (Ampere)
2025-09-03 12:35 ` Valentin Schneider
2025-09-03 14:14 ` Vincent Guittot
2025-09-03 20:33 ` Christoph Lameter (Ampere)
2025-09-11 8:55 ` Vincent Guittot
2025-08-20 17:31 ` Christoph Lameter (Ampere)
2025-08-21 9:01 ` Valentin Schneider
2025-09-04 13:54 ` Frederic Weisbecker
2025-09-04 15:34 ` Christoph Lameter (Ampere)
2025-09-04 16:13 ` Frederic Weisbecker
2025-09-04 16:18 ` Christoph Lameter (Ampere)
2025-09-05 12:16 ` Frederic Weisbecker
2025-09-05 16:45 ` Christoph Lameter (Ampere)
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=xhsmhtt23h0nw.mognet@vschneid-thinkpadt14sgen2i.remote.csb \
--to=vschneid@redhat.com \
--cc=adamli@os.amperecomputing.com \
--cc=bsegall@google.com \
--cc=cl@linux.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=patches@amperecomputing.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®