linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Raillard <douglas.raillard@arm.com>
To: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	mingo@redhat.com, rjw@rjwysocki.net, viresh.kumar@linaro.org,
	quentin.perret@arm.com, dietmar.eggemann@arm.com
Subject: Re: [RFC PATCH v2 0/5] sched/cpufreq: Make schedutil energy aware
Date: Mon, 8 Jul 2019 14:46:07 +0100	[thread overview]
Message-ID: <b35c2281-4d91-2164-65f9-9ef3a28c35d0@arm.com> (raw)
In-Reply-To: <20190708110904.ecrlr4p77n4r6qzk@e110439-lin>

Hi Patrick,

On 7/8/19 12:09 PM, Patrick Bellasi wrote:
> On 03-Jul 17:36, Douglas Raillard wrote:
>> On 7/2/19 4:51 PM, Peter Zijlstra wrote:
>>> On Thu, Jun 27, 2019 at 06:15:58PM +0100, Douglas RAILLARD wrote:
> 
> [...]
> 
>>> I'm not immediately seeing how it is transient; that is, PELT has a
>>> wobble in it's steady state, is that accounted for?
>>>
>>
>> The transient-ness of the ramp boost I'm introducing comes from the fact that for a
>> periodic task at steady state, task_ue.enqueued <= task_u when the task is executing.
>                  ^^^^^^^^^^^^^^^
> 
> I find your above "at steady state" a bit confusing.
> 
> The condition "task_ue.enqueue <= task_u" is true only for the first
> task's big activation after a series of small activations, e.g. a task
> switching from 20% to 70%.

I actually made a typo and meant "task_u <= task_ue.enqueue". The rest of the paragraph
is aligned with that condition, sorry for the confusion.


> That's the transient stat you refer to, isn't it?
> 
>> That is because task_ue.enqueued is sampled at dequeue time, precisely at the moment
>> at which task_u is reaching its max for that task.
> 
> Right, so in the example above we will have enqueued=20% while task_u
> is going above to converge towards 70%
> 
>> Since we only take into account positive boosts, ramp boost will
>> only have an impact in the "increase transients".
> 
> Right.
> 
> I think Peter was referring to the smallish wobbles we see when the
> task already converged to 70%. If that's the case I would say they are
> already fully covered also by the current util_est.

Yes, that's covered by the "task_u <= task_ue.enqueue" condition, with task_ue.enqueued
not having any of these "mid freq" content that we call wobble here.

Util est enqueued acts as an adaptive filter that kills frequencies higher than 1/task_period,
task_period being the delta between the two previous "enqueue events". All what's (mostly) remaining
after that is util variation of larger periods, with a positive shift that increases with
the task period (mean(enqueued) = mean(util_avg) + f(task_period)).


> You are also correct in pointing out that in the steady state
> ramp_boost will not be triggered in that steady state.
> 
> IMU, that's for two main reasons:
>   a) it's very likely that enqueued <= util_avg
>   b) even in case enqueued should turn out to be _slightly_ bigger then
>      util_avg, the corresponding (proportional) ramp_boost would be so
>      tiny to not have any noticeable effect on OPP selection.
> 
> Am I correct on point b) above?

Assuming you meant "util_avg slightly bigger than enqueued" (which is when boosting triggers),
then yes since ramp_boost effect is proportional to "task_ue.enqueue - task_u". It makes it robust
against that.

> 
> Could you maybe come up with some experimental numbers related to that
> case specifically?

With:
* an rt-app task ramping up from 5% to 75% util in one big step. The whole cycle is 0.6s long
  (0.3s at 5% followed by 0.3s at 75%). This cycle is repeated 20 times and the average of
  boosting is taken.

* a hikey 960 (this impact the frequency at which the test runs at the beginning of 75% phase,
   which impacts the number of missed activations before the util ramped up).

* assuming an OPP exists for each util value (i.e. 1024 OPPs, so the effect
   of boost on consumption is not impacted by OPP capacities granularity)

Then the boosting feature would increase the average power consumption by 3.1%, out of which 0.12% can
be considered "spurious boosting" due to the util taking some time to really converge to its
steady state value. In practice, the impact of small boosts will be even lower since they will less likely
trigger the selection of a high OPP due to OPP capacity granularity > 1 util unit.

> 
> Best,
> Patrick
> 

Best regards,
Douglas

  reply	other threads:[~2019-07-08 13:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 17:15 [RFC PATCH v2 0/5] sched/cpufreq: Make schedutil energy aware Douglas RAILLARD
2019-06-27 17:15 ` [RFC PATCH v2 1/5] PM: Introduce em_pd_get_higher_freq() Douglas RAILLARD
2019-06-27 17:16 ` [RFC PATCH v2 2/5] sched/cpufreq: Attach perf domain to sugov policy Douglas RAILLARD
2019-06-27 17:16 ` [RFC PATCH v2 3/5] sched/cpufreq: Hook em_pd_get_higher_power() into get_next_freq() Douglas RAILLARD
2019-06-27 17:16 ` [RFC PATCH v2 4/5] sched/cpufreq: Introduce sugov_cpu_ramp_boost Douglas RAILLARD
2019-06-28 15:08   ` Patrick Bellasi
2019-06-27 17:16 ` [RFC PATCH v2 5/5] sched/cpufreq: Boost schedutil frequency ramp up Douglas RAILLARD
2019-07-02 15:44 ` [RFC PATCH v2 0/5] sched/cpufreq: Make schedutil energy aware Peter Zijlstra
2019-07-03 13:38   ` Douglas Raillard
2019-07-08 11:13     ` Patrick Bellasi
2019-07-08 13:49       ` Douglas Raillard
2019-07-02 15:51 ` Peter Zijlstra
2019-07-03 16:36   ` Douglas Raillard
2019-07-08 11:09     ` Patrick Bellasi
2019-07-08 13:46       ` Douglas Raillard [this message]
2019-07-09 10:37         ` Patrick Bellasi
2019-08-09 17:37           ` Douglas Raillard

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=b35c2281-4d91-2164-65f9-9ef3a28c35d0@arm.com \
    --to=douglas.raillard@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=patrick.bellasi@arm.com \
    --cc=peterz@infradead.org \
    --cc=quentin.perret@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@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;
as well as URLs for NNTP newsgroup(s).