From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Quentin Perret <qperret@google.com>,
Vincent Donnefort <vincent.donnefort@arm.com>
Cc: peterz@infradead.org, mingo@redhat.com,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
patrick.bellasi@matbug.net, valentin.schneider@arm.com
Subject: Re: [PATCH] sched/fair: Fix task utilization accountability in cpu_util_next()
Date: Tue, 23 Feb 2021 15:47:42 +0100 [thread overview]
Message-ID: <c101892b-157c-0074-12cb-9651d1c4c4e6@arm.com> (raw)
In-Reply-To: <YDPajlnvgkonocpp@google.com>
On 22/02/2021 17:23, Quentin Perret wrote:
> On Monday 22 Feb 2021 at 15:58:56 (+0000), Quentin Perret wrote:
>> But in any case, if we're going to address this, I'm still not sure this
>> patch will be what we want. As per my first comment we need to keep the
>> frequency estimation right.
>
> Totally untested, but I think in principle you would like something like
> the snippet below. Would that work?
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 04a3ce20da67..6594d875c6ac 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6534,8 +6534,13 @@ compute_energy(struct task_struct *p, int dst_cpu, struct perf_domain *pd)
> * its pd list and will not be accounted by compute_energy().
> */
> for_each_cpu_and(cpu, pd_mask, cpu_online_mask) {
> - unsigned long cpu_util, util_cfs = cpu_util_next(cpu, p, dst_cpu);
> + unsigned long util_freq = cpu_util_next(cpu, p, dst_cpu);
> + unsigned long util_running = cpu_util_without(cpu, p);
Wouldn't this be the same as:
unsigned long util_running = cpu_util_next(cpu, p, -1);
except some different handling of !last_update_time and
'task_on_rq_queued(p) || current == p)' in cpu_util_without() which
shouldn't happen in EAS.
We have quite a lot of util related functions!
[...]
next prev parent reply other threads:[~2021-02-23 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-22 9:54 vincent.donnefort
2021-02-22 10:11 ` Quentin Perret
2021-02-22 11:36 ` Vincent Donnefort
2021-02-22 12:23 ` Quentin Perret
2021-02-22 15:01 ` Vincent Donnefort
2021-02-22 15:58 ` Quentin Perret
2021-02-22 16:23 ` Quentin Perret
2021-02-22 16:39 ` Vincent Donnefort
2021-02-22 16:43 ` Quentin Perret
2021-02-23 14:47 ` Dietmar Eggemann [this message]
2021-02-22 16:31 ` Vincent Donnefort
2021-02-22 16:35 ` Quentin Perret
2021-02-23 14:44 ` Dietmar Eggemann
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=c101892b-157c-0074-12cb-9651d1c4c4e6@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.donnefort@arm.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
all inboxes | Powered by JetHome®