From: Pierre Gondois <pierre.gondois@arm.com>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>,
linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] sched/idle: Prevent stopping the tick when there is no cpuidle driver
Date: Thu, 21 Dec 2023 16:22:48 +0100 [thread overview]
Message-ID: <c09fb78b-5bf9-4c0b-b93f-10fd19a4ab36@arm.com> (raw)
In-Reply-To: <20231215130501.24542-1-anna-maria@linutronix.de>
Hello Anna-Maria,
On 12/15/23 14:05, Anna-Maria Behnsen wrote:
> When there is no cpuidle driver, the system tries to stop the tick even if
> the system is fully loaded. But stopping the tick is not for free and it
> decreases performance on a fully loaded system. As there is no (cpuidle)
> framework which brings CPU in a power saving state when nothing needs to be
> done, there is also no power saving benefit when stopping the tick.
Just in case is wasn't taken into consideration:
-
Stopping the tick isn't free on a busy system, but it should also cost
something to regularly handle ticks on each CPU of an idle system.
FWIU, disabling the ticks also allows to add a CPU to the 'nohz.idle_cpus_mask'
mask, which helps the idle load balancer picking an idle CPU to do load
balancing for all the idle CPUs (cf. kick_ilb()).
It seems better to do one periodic balancing for all the idle CPUs rather
than periodically waking-up all CPUs to try to balance.
-
I would have assumed that if the system was fully loaded, ticks would
not be stopped, or maybe I misunderstood the case.
I assume the wake-up latency would be improved if the tick doesn't
have to be re-setup again.
Regards,
Pierre
>
> Therefore do not stop the tick when there is no cpuidle driver.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> ---
> kernel/sched/idle.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index 565f8374ddbb..fd111686aaf3 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -165,8 +165,6 @@ static void cpuidle_idle_call(void)
> */
>
> if (cpuidle_not_available(drv, dev)) {
> - tick_nohz_idle_stop_tick();
> -
> default_idle_call();
> goto exit_idle;
> }
next prev parent reply other threads:[~2023-12-21 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 13:05 Anna-Maria Behnsen
2023-12-21 15:22 ` Pierre Gondois [this message]
2024-01-09 16:24 ` Anna-Maria Behnsen
2024-01-10 10:20 ` Pierre Gondois
2024-01-12 10:56 ` Anna-Maria Behnsen
2024-01-12 13:39 ` Pierre Gondois
2024-01-12 14:52 ` Thomas Gleixner
2024-01-15 12:40 ` Pierre Gondois
2024-01-15 13:10 ` Anna-Maria Behnsen
2024-01-15 13:29 ` Vincent Guittot
2024-01-15 15:41 ` Pierre Gondois
2024-01-22 10:22 ` Anna-Maria Behnsen
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=c09fb78b-5bf9-4c0b-b93f-10fd19a4ab36@arm.com \
--to=pierre.gondois@arm.com \
--cc=anna-maria@linutronix.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.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®