From: Shubhang Kaushik <shubhang@os.amperecomputing.com>
To: Frederic Weisbecker <frederic@kernel.org>,
Adam Li <adamli@os.amperecomputing.com>
Cc: anna-maria@linutronix.de, tglx@linutronix.de, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, vschneid@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, cl@linux.com,
linux-kernel@vger.kernel.org, patches@amperecomputing.com,
Christoph Lameter <cl@gentwo.org>
Subject: Re: [PATCH RESEND 1/2] tick/nohz: Fix wrong NOHZ idle CPU state
Date: Wed, 11 Feb 2026 15:19:47 -0800 (PST) [thread overview]
Message-ID: <e03fc527-383d-5e0a-a581-81aed2468c34@os.amperecomputing.com> (raw)
In-Reply-To: <aLm4wRwKBMGkekkT@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]
Hi Frederic,
On Thu, 4 Sep 2025, Frederic Weisbecker wrote:
>> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
>> index c527b421c865..b900a120ab54 100644
>> --- a/kernel/time/tick-sched.c
>> +++ b/kernel/time/tick-sched.c
>> @@ -1229,8 +1229,9 @@ void tick_nohz_idle_stop_tick(void)
>> ts->idle_sleeps++;
>> ts->idle_expires = expires;
>>
>> - if (!was_stopped && tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
>> - ts->idle_jiffies = ts->last_jiffies;
>> + if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
>> + if (!was_stopped)
>> + ts->idle_jiffies = ts->last_jiffies;
>> nohz_balance_enter_idle(cpu);
>
> The current state is indeed broken and some people have already tried to fix it.
> The thing is nohz_full don't want dynamic isolation because it is deemed to run a
> single task. Therefore those tasks must be placed manually in order not to break
> isolation guarantees by accident.
>
> In fact nohz_full doesn't make much sense without isolcpus (or isolated cpuset
> v2 partitions) and I even intend to make nohz_full depend on domain isolation
> in the long term.
>
> Thanks.
Following up on the isolation concerns raised previously, I’ve posted an
updated patch [1] that provides a clearer justification and performance
data from Ampere Altra.
The core issue identified is that on high core count systems,
nohz_full CPUs often become stranded idle because they are missing from
nohz.idle_cpus_mask. While I understand the intent for manual isolation,
our testing shows that this current behavior leads to significant under
utilization.
- LLM Workloads: ~14% throughput improvement in llama-batched-bench.
- Scheduler Jitter: ~26% improvement in hackbench multi-process tests.
The patch decouples the tick-stop accounting (which should only happen
once) from the balancer registration. Because nohz_balance_enter_idle() is
idempotent, an idle CPU would be visible to the balancer without breaking
the isolation of other cores that are actually running
tasks.
If a CPU has entered do_idle(), it is no longer running an isolated
workload. It is invisible to the balancer at that point leading to
performance regression rather than an isolation guarantee.
You can find the updated patch and full performance breakdown here:
[1] https://lkml.org/lkml/2026/2/3/2119
Regards,
Shubhang Kaushik
>
>> }
>> } else {
>> --
>> 2.34.1
>>
>
> --
> Frederic Weisbecker
> SUSE Labs
>
next prev parent reply other threads:[~2026-02-11 23:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 4:27 [PATCH RESEND 0/2] tick/nohz: CPU cannot enter NOHZ idle balance state Adam Li
2025-08-21 4:27 ` [PATCH RESEND 1/2] tick/nohz: Fix wrong NOHZ idle CPU state Adam Li
2025-09-04 16:05 ` Frederic Weisbecker
2025-09-04 16:10 ` Christoph Lameter (Ampere)
2025-09-05 11:47 ` Frederic Weisbecker
2025-09-08 15:25 ` Christoph Lameter (Ampere)
2026-02-11 23:19 ` Shubhang Kaushik [this message]
2025-08-21 4:27 ` [PATCH RESEND 2/2] tick/nohz: Trigger warning when CPU in wrong NOHZ idle state Adam Li
2025-09-03 8:01 ` 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=e03fc527-383d-5e0a-a581-81aed2468c34@os.amperecomputing.com \
--to=shubhang@os.amperecomputing.com \
--cc=adamli@os.amperecomputing.com \
--cc=anna-maria@linutronix.de \
--cc=bsegall@google.com \
--cc=cl@gentwo.org \
--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=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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
all inboxes | Powered by JetHome®