From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Christian Loehle <christian.loehle@arm.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
rafael@kernel.org
Cc: vincent.guittot@linaro.org, qyousef@layalina.io,
peterz@infradead.org, daniel.lezcano@linaro.org,
anna-maria@linutronix.de, kajetan.puchalski@arm.com,
lukasz.luba@arm.com
Subject: Re: [PATCH 4/6] cpuidle: teo: Increase minimum time to stop tick
Date: Fri, 7 Jun 2024 10:14:38 +0200 [thread overview]
Message-ID: <c11acac7-085a-4041-a1f3-8b4f46e4b691@arm.com> (raw)
In-Reply-To: <20240606090050.327614-5-christian.loehle@arm.com>
On 06/06/2024 11:00, Christian Loehle wrote:
> Since stopping the tick isn't free, add at least some minor constant
> (1ms) for the threshold to stop the tick.
Sounds pretty arbitrary to me? 'duration_ns' is either based on
target_residency_ns or tick_nohz_get_sleep_length() or even set to
TICK_NSEC/2. Does adding 1ms makes sense to all these cases? But then
why 1ms?
> Signed-off-by: Christian Loehle <christian.loehle@arm.com>
> ---
> drivers/cpuidle/governors/teo.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
> index 216d34747e3b..ca9422bbd8db 100644
> --- a/drivers/cpuidle/governors/teo.c
> +++ b/drivers/cpuidle/governors/teo.c
> @@ -622,10 +622,10 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
> /*
> * Allow the tick to be stopped unless the selected state is a polling
> * one or the expected idle duration is shorter than the tick period
> - * length.
> + * length plus some constant (1ms) to account for stopping it.
> */
> if ((!(drv->states[idx].flags & CPUIDLE_FLAG_POLLING) &&
> - duration_ns >= TICK_NSEC) || tick_nohz_tick_stopped())
> + duration_ns > NSEC_PER_MSEC + TICK_NSEC) || tick_nohz_tick_stopped())
> return idx;
>
> out_tick_state:
next prev parent reply other threads:[~2024-06-07 8:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 9:00 [PATCH 0/6] cpuidle: teo: fixes and improvements Christian Loehle
2024-06-06 9:00 ` [PATCH 1/6] cpuidle: teo: Increase util-threshold Christian Loehle
2024-06-07 8:01 ` Dietmar Eggemann
2024-06-07 9:35 ` Christian Loehle
2024-06-09 22:47 ` Qais Yousef
2024-06-10 9:11 ` Christian Loehle
2024-06-16 21:54 ` Qais Yousef
2024-06-10 9:57 ` Ulf Hansson
2024-06-16 21:50 ` Qais Yousef
2024-06-19 9:53 ` Christian Loehle
2024-06-06 9:00 ` [PATCH 2/6] cpuidle: teo: Don't stop tick on utilized Christian Loehle
2024-06-06 9:00 ` [PATCH 3/6] cpuidle: teo: Don't always stop tick on one state Christian Loehle
2024-06-06 9:00 ` [PATCH 4/6] cpuidle: teo: Increase minimum time to stop tick Christian Loehle
2024-06-07 8:14 ` Dietmar Eggemann [this message]
2024-06-07 9:29 ` Christian Loehle
2024-06-06 9:00 ` [PATCH 5/6] cpuidle: teo: Remove recent intercepts metric Christian Loehle
2024-06-07 8:57 ` Dietmar Eggemann
2024-06-07 9:26 ` Christian Loehle
2024-06-06 9:00 ` [PATCH 6/6] cpuidle: teo: Don't count non-existent intercepts Christian Loehle
2024-06-07 10:17 ` Dietmar Eggemann
2024-06-10 11:06 ` Christian Loehle
2024-06-06 11:54 ` [PATCH 0/6] cpuidle: teo: fixes and improvements Christian Loehle
2024-06-06 12:29 ` Rafael J. Wysocki
2024-06-06 12:36 ` 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=c11acac7-085a-4041-a1f3-8b4f46e4b691@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=anna-maria@linutronix.de \
--cc=christian.loehle@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=kajetan.puchalski@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=rafael@kernel.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®