From: Lukasz Luba <lukasz.luba@arm.com>
To: Pierre.Gondois@arm.com
Cc: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com,
qperret@qperret.net, dietmar.eggemann@arm.com,
Vincent.Donnefort@arm.com, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com
Subject: Re: [PATCH v2 2/2] sched/fair: Fix negative energy delta in find_energy_efficient_cpu()
Date: Fri, 30 Apr 2021 12:13:01 +0100 [thread overview]
Message-ID: <49c159b6-ebd7-e5fc-29ca-70a1e3dcf0f1@arm.com> (raw)
In-Reply-To: <20210429101948.31224-3-Pierre.Gondois@arm.com>
On 4/29/21 11:19 AM, Pierre.Gondois@arm.com wrote:
> From: Pierre Gondois <Pierre.Gondois@arm.com>
>
> find_energy_efficient_cpu() (feec()) searches the best energy CPU
> to place a task on. To do so, compute_energy() estimates the energy
> impact of placing the task on a CPU, based on CPU and task utilization
> signals.
>
> Utilization signals can be concurrently updated while evaluating a
> performance domain (pd). In some cases, this leads to having a
> 'negative delta', i.e. placing the task in the pd is seen as an
> energy gain. Thus, any further energy comparison is biased.
>
> In case of a 'negative delta', return prev_cpu since:
> 1. a 'negative delta' happens in less than 0.5% of feec() calls,
> on a Juno with 6 CPUs (4 little, 2 big)
> 2. it is unlikely to have two consecutive 'negative delta' for
> a task, so if the first call fails, feec() will correctly
> place the task in the next feec() call
> 3. EAS current behavior tends to select prev_cpu if the task
> doesn't raise the OPP of its current pd. prev_cpu is EAS's
> generic decision
> 4. prev_cpu should be preferred to returning an error code.
> In the latter case, select_idle_sibling() would do the placement,
> selecting a big (and not energy efficient) CPU. As 3., the task
> would potentially reside on the big CPU for a long time
>
> Reported-by: Xuewen Yan <xuewen.yan@unisoc.com>
> Suggested-by: Xuewen Yan <xuewen.yan@unisoc.com>
> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
> ---
> kernel/sched/fair.c | 28 ++++++++++++++++------------
> 1 file changed, 16 insertions(+), 12 deletions(-)
>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Regards,
Lukasz
next prev parent reply other threads:[~2021-04-30 11:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 10:19 [PATCH v2 0/2] sched/fair: find_energy_efficient_cpu() enhancements Pierre.Gondois
2021-04-29 10:19 ` [PATCH v2 1/2] sched/fair: Only compute base_energy_pd if necessary Pierre.Gondois
2021-04-30 11:03 ` Lukasz Luba
2021-05-03 12:52 ` Dietmar Eggemann
2021-04-29 10:19 ` [PATCH v2 2/2] sched/fair: Fix negative energy delta in find_energy_efficient_cpu() Pierre.Gondois
2021-04-30 11:13 ` Lukasz Luba [this message]
2021-05-03 12:52 ` Dietmar Eggemann
2021-05-04 9:27 ` Vincent Donnefort
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=49c159b6-ebd7-e5fc-29ca-70a1e3dcf0f1@arm.com \
--to=lukasz.luba@arm.com \
--cc=Pierre.Gondois@arm.com \
--cc=Vincent.Donnefort@arm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qperret@qperret.net \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=xuewen.yan@unisoc.com \
/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