From: "Doug Smythies" <dsmythies@telus.net>
To: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>
Cc: 'Peter Zijlstra' <peterz@infradead.org>,
'Linux Kernel Mailing List' <linux-kernel@vger.kernel.org>,
'Daniel Lezcano' <daniel.lezcano@linaro.org>,
'Linux PM' <linux-pm@vger.kernel.org>,
Doug Smythies <dsmythies@telus.net>
Subject: RE: [PATCH 0/6] cpuidle: menu: Fixes, optimizations and cleanups
Date: Tue, 9 Oct 2018 17:02:36 -0700 [thread overview]
Message-ID: <003d01d4602c$905b5840$b11208c0$@net> (raw)
In-Reply-To: 9pWMgRJJQ3psd9pWRgA8E4
On 2018.10.09 03:43 Rafael J. Wysocki wrote:
...[snip]...
> While at it, could you test the appended patch
> (on top of the previous 8) for me please?
>
> I think that this code can be simplified now.
>
> ---
> drivers/cpuidle/governors/menu.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/cpuidle/governors/menu.c
> ===================================================================
> --- linux-pm.orig/drivers/cpuidle/governors/menu.c
> +++ linux-pm/drivers/cpuidle/governors/menu.c
> @@ -371,12 +371,12 @@ static int menu_select(struct cpuidle_dr
> if (s->target_residency > predicted_us) {
> /*
> * Use a physical idle state, not busy polling, unless
> - * a timer is going to trigger really really soon.
> + * a timer is going to trigger soon enough.
> */
> if ((drv->states[idx].flags & CPUIDLE_FLAG_POLLING) &&
> - i == idx + 1 && latency_req > s->exit_latency &&
> - data->next_timer_us > max_t(unsigned int, 20,
> - s->target_residency)) {
> + s->exit_latency <= latency_req &&
> + s->target_residency <= data->next_timer_us) {
> + predicted_us = s->target_residency;
> idx = i;
> break;
> }
It seems to work fine.
I was unable to detect any difference between the 8 patch set and with
this additional patch for any of the tests that I ran. (at least beyond
noise and/or experimental error.)
Note: I didn't publish any of the pretty graphs.
... Doug
next prev parent reply other threads:[~2018-10-10 0:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 5:53 [PATCH 0/6] cpuidle: menu: Fixes, optimizations and cleanups Doug Smythies
2018-10-08 7:51 ` Rafael J. Wysocki
2018-10-08 22:14 ` Doug Smythies
2018-10-08 22:26 ` Rafael J. Wysocki
2018-10-09 10:42 ` Rafael J. Wysocki
2018-10-10 0:02 ` Doug Smythies [this message]
2018-10-10 7:14 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2018-10-02 21:41 Rafael J. Wysocki
2018-10-04 6:55 ` Rafael J. Wysocki
2018-10-04 7:51 ` Peter Zijlstra
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='003d01d4602c$905b5840$b11208c0$@net' \
--to=dsmythies@telus.net \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).