From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, Leo Yan <leo.yan@linaro.org>
Subject: Re: [PATCH] sched: idle: Avoid retaining the tick when it has been stopped
Date: Mon, 20 Aug 2018 11:14:30 +0200 [thread overview]
Message-ID: <20180820091430.GV2494@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJZ5v0gD79NuTgr3dVS_3cBFz5Q1JtQTP8mDfSM1tvwDcYkFAQ@mail.gmail.com>
On Sat, Aug 18, 2018 at 11:57:00PM +0200, Rafael J. Wysocki wrote:
> So I have given more consideration to this and my conclusion is that
> restarting the tick between cpuidle_select() and call_cpuidle() is a
> bad idea.
Ack, we should only restart the tick once we leave the idle loop.
> First off, if need_resched() is "false", the primary reason for
> running the tick on the given CPU is not there, so it only might be
> useful as a "backup" timer to wake up the CPU from an inadequate idle
> state.
this..
<snip>
> The second
> reason is when the governor predicts a wakeup which is not by a timer
> in this time frame and it is quite arguable what the governor should
> do then. IMO it at least is not unreasonable to throw the prediction
> away and still go for the closest timer event in that case (which is
> the current approach).
Yes, I think I can agree with that, predictions at that scale are just
not that useful. The primary point of the governor is to stay shallow
when we can, but once we're deep and have disabled the tick and lost
caches, there's really no point anymore. Waking up is going to hurt.
> There's more, though. Restarting the tick between cpuidle_select()
> and call_cpuidle() might introduce quite a bit of latency into that
> point and that would mess up with the idle state selection (e.g.
> selecting a very shallow idle state might not make a lot of sense if
> that latency was high enough, because the expected wakeup might very
> well take place when the tick was being restarted), so it should
> rather be avoided IMO.
Absolutely, mucking with the tick just because of a hunch is the wrong
thing.
So,
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
for this one.
next prev parent reply other threads:[~2018-08-20 9:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 17:08 [PATCH] sched: idle: Avoid retaining the tick when it has been stopped Rafael J. Wysocki
2018-08-10 6:19 ` leo.yan
2018-08-10 7:15 ` Rafael J. Wysocki
2018-08-16 13:27 ` Frederic Weisbecker
2018-08-17 9:32 ` Rafael J. Wysocki
2018-08-17 10:05 ` Rafael J. Wysocki
2018-08-17 14:12 ` Frederic Weisbecker
2018-08-18 21:57 ` Rafael J. Wysocki
2018-08-19 0:36 ` leo.yan
2018-08-19 7:57 ` Rafael J. Wysocki
2018-08-20 9:14 ` Peter Zijlstra [this message]
2018-08-20 14:42 ` Frederic Weisbecker
2018-08-20 21:21 ` Rafael J. Wysocki
2018-08-21 23:21 ` Tony Lindgren
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=20180820091430.GV2494@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=frederic@kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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