Linux Power Management development
 help / color / mirror / Atom feed
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: christian.loehle@arm.com, joseph.salisbury@oracle.com, rafael@kernel.org
Cc: rafael.j.wysocki@intel.com, mingo@redhat.com,
	peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	frederic@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
	Zhan Xusheng <zhanxusheng1024@gmail.com>
Subject: Re: [REGRESSION] sched/idle: Sysbench threads regression after f4c31b07b136
Date: Wed, 29 Jul 2026 10:36:15 +0800	[thread overview]
Message-ID: <20260729022930.318742-1-zhanxusheng1024@gmail.com> (raw)
In-Reply-To: <774c3a68-6a6b-4e2e-a347-03e36953b750@arm.com>

From: Zhan Xusheng <zhanxusheng1024@gmail.com>

On Tue, Jul 28, 2026 at 09:30:39 +0100, Christian Loehle wrote:
> Interesting, so your guests (no cpuidle) need the tick stopped at every
> idle entry to not regress, i.e. the below?
> Is there anything obvious that shows why that would be? Maybe in the
> hypervisor behaviour?

I think it lines up with the got_tick heuristic rather than anything
hypervisor-specific in the guest kernel path.

do_idle() resets got_tick to false at the top of every idle episode and
passes it as stop_tick, so the first idle iteration always calls
idle_call_stop_or_retain_tick(false); tick_nohz_idle_enter() hasn't stopped
the tick at that point, so that takes the retain branch. Only after the
tick fires once (got_tick becomes true) does a later iteration stop it.
So with f4c31b the no-driver path leaves the periodic tick armed at the
start of every idle episode, whereas the old code stopped it
unconditionally.

That also explains the test results: forcing (false) keeps the retain and
still regresses, while (true) / the direct tick_nohz_idle_stop_tick()
restores the old always-stop and recovers.

The hypervisor is then where the consequence shows up: a guest that leaves
its tick running keeps a ~1/HZ timer pending, so the host sees an imminent
timer and keeps waking/scheduling the vCPU instead of letting it idle. That
is at least consistent with the shapes - the x86 shape at HZ=1000 regressed
more (-29%) than the arm shape at HZ=250 (-10%), i.e. more retained ticks,
more interference. For the no-driver bare halt there is no governor/state
selection that a retained tick could help, so stopping unconditionally is
strictly better.

Thanks,
Zhan Xusheng

  parent reply	other threads:[~2026-07-29  2:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 16:25 [REGRESSION] sched/idle: Sysbench threads regression after f4c31b07b136 Joseph Salisbury
2026-07-02 18:47 ` Rafael J. Wysocki (Intel)
2026-07-06 14:29   ` Christian Loehle
2026-07-08 15:25     ` Joseph Salisbury
2026-07-24 17:20     ` Joseph Salisbury
2026-07-28  8:30       ` Christian Loehle
2026-07-28 16:37         ` [PATCH] sched/idle: Stop the tick when no cpuidle driver is available Christian Loehle
2026-07-29  2:36         ` Zhan Xusheng [this message]
2026-07-29 18:03           ` [REGRESSION] sched/idle: Sysbench threads regression after f4c31b07b136 Rafael J. Wysocki (Intel)
2026-07-29 18:25         ` Rafael J. Wysocki (Intel)
2026-07-30  9:27           ` Christian Loehle

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=20260729022930.318742-1-zhanxusheng1024@gmail.com \
    --to=zhanxusheng1024@gmail.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=joseph.salisbury@oracle.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=regressions@lists.linux.dev \
    --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