From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Pierre.Gondois@arm.com
Cc: linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com,
qperret@qperret.net, dietmar.eggemann@arm.com,
Lukasz.Luba@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: Tue, 4 May 2021 10:27:15 +0100 [thread overview]
Message-ID: <20210504092714.GA100203@e120877-lin.cambridge.arm.com> (raw)
In-Reply-To: <20210429101948.31224-3-Pierre.Gondois@arm.com>
On Thu, Apr 29, 2021 at 11:19:48AM +0100, 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>
> ---
I've been testing this patch on the Google's Pixel4, with a modified kernel that
we are using to evalute mailine performance and energy consumption for a
"real-life" mobile usage.
As always, I ran the Work2.0 workload from PCMark on Android. With that setup I
haven't observed any statistically significant performance change neither any CPU
Idle residency modification. Nevertheless, this code protected against ~600 bad
computations (and by extent bad placements) during a single PCMark iteration
and by looking at the traces, this is saving from spurious wake-ups that would
otherwise happen on the biggest CPUs of the system.
+ Reviewed-by: Vincent Donnefort <vincent.donnefort@arm.com>
prev parent reply other threads:[~2021-05-04 9:27 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
2021-05-03 12:52 ` Dietmar Eggemann
2021-05-04 9:27 ` Vincent Donnefort [this message]
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=20210504092714.GA100203@e120877-lin.cambridge.arm.com \
--to=vincent.donnefort@arm.com \
--cc=Lukasz.Luba@arm.com \
--cc=Pierre.Gondois@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
all inboxes | Powered by JetHome®