From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Qais Yousef <qyousef@layalina.io>,
Kajetan Puchalski <kajetan.puchalski@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Vincent Donnefort <vdonnefort@google.com>,
Quentin Perret <qperret@google.com>,
Abhijeet Dharmapurikar <adharmap@quicinc.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] sched: Consider CPU contention in frequency & load-balance busiest CPU selection
Date: Fri, 5 May 2023 20:16:31 +0200 [thread overview]
Message-ID: <11e07f3a-3576-f408-1891-2dca5ddf343e@arm.com> (raw)
In-Reply-To: <CAKfTPtBcT8KbH=r2zCgqBF7V7cp=REceiyWWjjCc8FD2btO-=A@mail.gmail.com>
On 05/05/2023 10:22, Vincent Guittot wrote:
> On Thu, 4 May 2023 at 19:11, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>>
>> On 03/05/2023 18:08, Vincent Guittot wrote:
>>> On Thu, 6 Apr 2023 at 17:50, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
[...]
>>>> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
>>>> index e3211455b203..728b186cd367 100644
>>>> --- a/kernel/sched/cpufreq_schedutil.c
>>>> +++ b/kernel/sched/cpufreq_schedutil.c
>>>> @@ -158,7 +158,8 @@ static void sugov_get_util(struct sugov_cpu *sg_cpu)
>>>> struct rq *rq = cpu_rq(sg_cpu->cpu);
>>>>
>>>> sg_cpu->bw_dl = cpu_bw_dl(rq);
>>>> - sg_cpu->util = effective_cpu_util(sg_cpu->cpu, cpu_util_cfs(sg_cpu->cpu),
>>>> + sg_cpu->util = effective_cpu_util(sg_cpu->cpu,
>>>> + cpu_boosted_util_cfs(sg_cpu->cpu),
>>>
>>> Shouldn't we have a similar change in feec to estimate correctly which
>>> OPP/ freq will be selected by schedutil ?
>>
>> Yes, this should be more correct. Schedutil and EAS should see the world
>> the same way.
>>
>> But IMHO only for the
>>
>> find_energy_efficient_cpu()
>> compute_energy()
>> eenv_pd_max_util()
>> util = cpu_util_next(..., p, ...)
>> effective_cpu_util(..., util, FREQUENCY_UTIL, ...)
>> ^^^^^^^^^^^^^^
> yes only to get same max utilization and as a result the same OPP as schedutil
>
>> case.
>>
>> Not sure what I do for the task contribution? We use
>> task_util(p)/_task_util_est(p) inside cpu_util_next().
>> Do I have to consider p->se.avg.runnable_avg as well?
>
> hmm, I would stay with util_avg for now
OK, in this case I'm trying to refactor cpu_util_next() so that
cpu_util_cfs() can call it as well. This will allow me to code the
runnable boosting only once in cpu_util_next().
Boosting can then be enabled via an additional `int boost` parameter for
cpu_util_next() and cpu_util_cfs().
next prev parent reply other threads:[~2023-05-05 18:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 15:50 [PATCH 0/1] sched: Consider CPU contention in frequency & load-balance busiest CPU selection Dietmar Eggemann
2023-04-06 15:50 ` [PATCH 1/1] " Dietmar Eggemann
2023-04-29 14:58 ` Peter Zijlstra
2023-05-03 17:13 ` Dietmar Eggemann
2023-05-04 15:23 ` Qais Yousef
2023-05-11 15:25 ` Dietmar Eggemann
2023-05-15 19:18 ` Qais Yousef
2023-05-03 16:08 ` Vincent Guittot
2023-05-04 17:11 ` Dietmar Eggemann
2023-05-05 8:22 ` Vincent Guittot
2023-05-05 18:16 ` Dietmar Eggemann [this message]
2023-05-05 7:10 ` Chen Yu
2023-05-05 18:02 ` Dietmar Eggemann
2023-05-07 2:19 ` Chen Yu
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=11e07f3a-3576-f408-1891-2dca5ddf343e@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=adharmap@quicinc.com \
--cc=kajetan.puchalski@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=qyousef@layalina.io \
--cc=vdonnefort@google.com \
--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