public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Christian Loehle <christian.loehle@arm.com>
Cc: Thomas Gleixner <tglx@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [patch 2/2] sched/idle: Make default_idle_call() NOHZ aware
Date: Mon, 2 Mar 2026 12:11:37 +0100	[thread overview]
Message-ID: <aaVwaZkSPZWaBilR@lothringen> (raw)
In-Reply-To: <ef998220-6ae4-43ea-9eca-0c1e56d69d11@arm.com>

On Mon, Mar 02, 2026 at 11:03:00AM +0000, Christian Loehle wrote:
> On 3/2/26 10:43, Frederic Weisbecker wrote:
> > On Sun, Mar 01, 2026 at 08:30:51PM +0100, Thomas Gleixner wrote:
> >> Guests fall back to default_idle_call() as there is no cpuidle driver
> >> available to them by default. That causes a problem in fully loaded
> >> scenarios where CPUs go briefly idle for a couple of microseconds:
> >>
> >> tick_nohz_idle_stop_tick() is invoked unconditionally which means unless
> >> there is timer pending in the next tick, the tick is stopped and a couple
> >> of microseconds later when the idle condition goes away restarted. That
> >> requires to program the clockevent device twice which implies a VM exit for
> >> each reprogramming.
> >>
> >> It was suggested to remove the tick_nohz_idle_stop_tick() invocation from
> >> the default idle code, but would be counterproductive. It would not allow
> >> the host to go into deeper idle states when the guest CPU is fully idle as
> >> it has to maintain the periodic tick.
> >>
> >> Cure this by implementing a trivial moving average filter which keeps track
> >> of the recent idle recidency time and only stop the tick when the average
> >> is larger than a tick.
> >>
> >> Signed-off-by: Thomas Gleixner <tglx@kernel.org>
> > 
> > Shouldn't there be instead a new dedicated cpuidle driver with proper governor support?
> 
> I think a dummy cpuidle driver is an option, but calling into any governor
> seems overkill IMO, it presents an option to the user where there really is
> none (after all the cpuidle governor would just make a boolean decision as
> there are no states).

I must confess I don't fully understand the picture with the non-existent states
but what Thomas is doing in his patch is basically an ad-hoc implementation of
cpuidle governor decision whether or not to stop the tick.

Thanks.

  reply	other threads:[~2026-03-02 11:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-01 19:30 [patch 0/2] sched/idle: Prevent pointless NOHZ transitions in default_idle_call() Thomas Gleixner
2026-03-01 19:30 ` [patch 1/2] sched/idle: Make default_idle_call() static Thomas Gleixner
2026-03-01 19:30 ` [patch 2/2] sched/idle: Make default_idle_call() NOHZ aware Thomas Gleixner
2026-03-02  6:05   ` K Prateek Nayak
2026-03-02 10:43   ` Frederic Weisbecker
2026-03-02 11:03     ` Christian Loehle
2026-03-02 11:11       ` Frederic Weisbecker [this message]
2026-03-02 11:39         ` Christian Loehle
2026-03-04  3:35           ` Qais Yousef
2026-03-02 11:03   ` Christian Loehle
2026-03-02 21:25     ` Rafael J. Wysocki
2026-03-04  3:03       ` Qais Yousef
2026-03-06 21:21         ` Rafael J. Wysocki
2026-03-06 21:31           ` Rafael J. Wysocki
2026-03-07 16:25             ` Rafael J. Wysocki
2026-03-10  3:54               ` Qais Yousef
2026-03-10  9:18                 ` Christian Loehle
2026-03-10 15:03                   ` Qais Yousef
2026-03-10 15:09                     ` Rafael J. Wysocki
2026-03-10 15:14                       ` Qais Yousef
2026-03-07 16:12         ` [PATCH v1] sched: idle: Make skipping governor callbacks more consistent Rafael J. Wysocki
2026-03-09  9:13           ` Christian Loehle
2026-03-09 12:26             ` Rafael J. Wysocki
2026-03-10  3:57               ` Qais Yousef
2026-03-09 12:44           ` Aboorva Devarajan
2026-03-10 14:28           ` Frederic Weisbecker
2026-03-02 12:17   ` [patch 2/2] sched/idle: Make default_idle_call() NOHZ aware Peter Zijlstra
2026-03-02 12:19     ` Peter Zijlstra
2026-03-02 21:23       ` Rafael J. Wysocki

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=aaVwaZkSPZWaBilR@lothringen \
    --to=frederic@kernel.org \
    --cc=christian.loehle@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@kernel.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