All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Cc: linux-pm@vger.kernel.org, daniel.lezcano@linaro.org,
	linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 0/7] Cpuidle: Minor fixes
Date: Tue, 11 Mar 2014 15:35:06 -0400	[thread overview]
Message-ID: <531F656A.1070905@redhat.com> (raw)
In-Reply-To: <2675767.poCYkWDpin@vostro.rjw.lan>

On 03/07/2014 07:12 AM, Rafael J. Wysocki wrote:
> On Wednesday, February 26, 2014 01:46:25 AM Rafael J. Wysocki wrote:
>> On Monday, February 24, 2014 08:29:30 AM Tuukka Tikkanen wrote:
>>> This set of patches makes some minor changes to menu governor and the poll
>>> idle state.
>>>
>>> Patch 1 is simply a rename of a variable to make the name better represent
>>> the contained information.
>>>
>>> Patch 2 fixes calculating actual residency in cases where the entered state
>>> is different from the state decided by the menu governor.
>>>
>>> Patch 3 makes sure the menu governor timer coefficients are not updated
>>> with values that might cause a coefficient to reach a value greater than
>>> unity.
>>>
>>> Patch 4 fixes calculation actual residency in cases where the entered state
>>> does not support measuring residency. In such cases the residency time
>>> is taken from time remaining until next timer expiry. The timer is expected
>>> to go off at the start of exit latency, not after it. Therefore the exit
>>> latency must not be substracted from the assumed value.
>>>
>>> Patch 5 moves the performance multiplier based comparison out of the state
>>> selection loop by changing it into a latency requirement. This allows
>>> using a generic state selection function accepting only (duration, latency)
>>> tuple as input. The change is possible by noting that performance multiplier
>>> is used only to check for a minimum predicted idle duration to exit latency
>>> ratio. As predicted idle duration is a constant for the loop, the maximum
>>> allowed latency can be calculated outside of the loop.
>>>
>>> Patch 6 prevents using negative values from tick_nohz_get_sleep_length()
>>> in the menu governor. If unchecked, the negative values are used as huge
>>> unsigned values. Negative values occur fairly often (e.g. on x86_64 I've
>>> seen this happen several times per minute) on a busy system, allowing
>>> the deepest state to win the selection while the shallowest should be picked.
>>>
>>> Patch 7 adds CPUIDLE_FLAG_TIME_VALID to poll_idle. I do not know of any
>>> platfrom where cpu_relax() would break ktime_get() and in fact poll_idle
>>> uses ktime_get itself.
>>> (Note: poll_idle updates dev->last_residency for some reason. Does it ever
>>> get called without going through cpuidle_enter_state, which will overwrite
>>> the value? Even if some state redirects to this state, the call will
>>> eventually return to the framework. The redundant time measurement could
>>> be removed, unless there is some obscure way of getting called on some
>>> platform that I am unable to figure out.)
>>>
>>> Tuukka Tikkanen (7):
>>>    Cpuidle: rename expected_us to next_timer_us in menu governor
>>>    Cpuidle: Use actual state latency in menu governor
>>>    Cpuidle: Ensure menu coefficients stay within domain
>>>    Cpuidle: Do not substract exit latency from assumed sleep length
>>>    Cpuidle: Move perf multiplier calculation out of the selection loop
>>>    Cpuidle: Deal with timer expiring in the past
>>>    Cpuidle: poll state can measure residency
>>>
>>>   drivers/cpuidle/driver.c         |    2 +-
>>>   drivers/cpuidle/governors/menu.c |   85 ++++++++++++++++++++++++--------------
>>>   2 files changed, 54 insertions(+), 33 deletions(-)
>>
>> I'm queuing this series up for 3.15.
>
> Patch [6/7] dropped, because of the Len's objection.

Did a replacement for patch 6/7 (fix the timer code so it
does not return a negative expiry time) get written and
merged somewhere? :)

I have been looking at the menu governor too recently,
but at a different aspect. I'll send out an RFC patch
soon (which will probably be shot down, and start
a discussion).


  reply	other threads:[~2014-03-11 19:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  6:29 [PATCH 0/7] Cpuidle: Minor fixes Tuukka Tikkanen
2014-02-24  6:29 ` [PATCH 1/7] Cpuidle: rename expected_us to next_timer_us in menu governor Tuukka Tikkanen
2014-02-24 16:52   ` Nicolas Pitre
2014-03-05 22:26   ` Len Brown
2014-02-24  6:29 ` [PATCH 2/7] Cpuidle: Use actual state latency " Tuukka Tikkanen
2014-02-24 22:35   ` Daniel Lezcano
2014-02-24  6:29 ` [PATCH 3/7] Cpuidle: Ensure menu coefficients stay within domain Tuukka Tikkanen
2014-02-24 16:57   ` Nicolas Pitre
2014-02-24  6:29 ` [PATCH 4/7] Cpuidle: Do not substract exit latency from assumed sleep length Tuukka Tikkanen
2014-02-24  6:29 ` [PATCH 5/7] Cpuidle: Move perf multiplier calculation out of the selection loop Tuukka Tikkanen
2014-02-24  6:29 ` [PATCH 6/7] Cpuidle: Deal with timer expiring in the past Tuukka Tikkanen
2014-02-24 17:05   ` Nicolas Pitre
2014-02-25  0:20     ` Rafael J. Wysocki
2014-03-06  7:41   ` Len Brown
2014-03-07  3:09     ` Len Brown
2014-03-10 10:54     ` Tuukka Tikkanen
2014-03-21 23:10       ` Len Brown
2014-02-24  6:29 ` [PATCH 7/7] Cpuidle: poll state can measure residency Tuukka Tikkanen
2014-02-25 10:56   ` Daniel Lezcano
2014-02-25 15:40     ` Tuukka Tikkanen
2014-02-24 21:24 ` [PATCH 0/7] Cpuidle: Minor fixes Daniel Lezcano
2014-02-26  0:46 ` Rafael J. Wysocki
2014-03-07 12:12   ` Rafael J. Wysocki
2014-03-11 19:35     ` Rik van Riel [this message]
2014-03-11 20:07       ` Rafael J. Wysocki
2014-03-11 21:06     ` Rik van Riel

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=531F656A.1070905@redhat.com \
    --to=riel@redhat.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tuukka.tikkanen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.