All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Vincent Donnefort <vincent.donnefort@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Quentin Perret <qperret@google.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH v4 0/9] Inefficient OPPs
Date: Wed, 4 Aug 2021 18:21:58 +0200	[thread overview]
Message-ID: <CAJZ5v0jLzj48-Bu1-i4=r3aratJwRzVYuaPvycUb--4jKSRkHw@mail.gmail.com> (raw)
In-Reply-To: <1625738946-295849-1-git-send-email-vincent.donnefort@arm.com>

On Thu, Jul 8, 2021 at 12:09 PM Vincent Donnefort
<vincent.donnefort@arm.com> wrote:
>
> Hi all,
>
> Here's the new patch-set version that brings support for skipping
> inefficiencies found by the Energy Model. This version doesn't bring
> changes for all the drivers that could benefit from this work at the
> moment. I'll do that in the next version or in a separated patch-set.
> Also, it's been discussed that enabling RELATION_E should be a driver
> flag. This sadly needs to be read in functions that do not have access to
> cpufreq_driver. Hence, I created a new policy flag instead.
>
> A bit of context:
>
> We (Power team in Arm) are working with an experimental kernel for the
> Google's Pixel4 to evaluate and improve the current mainline performance
> and energy consumption on a real life device with Android.
>
> The SD855 SoC found in this phone has several OPPs that are inefficient.
> I.e. despite a lower frequency, they have a greater cost. (That cost being
> fmax * OPP power / OPP freq). This issue is twofold. First of course,
> running a specific workload at an inefficient OPP is counterproductive
> since it wastes wasting energy. But also, inefficient OPPs make a
> performance domain less appealing for task placement than it really is.
>
> We evaluated the change presented here by running 30 iterations of Android
> PCMark "Work 2.0 Performance". While we did not see any statistically
> significant performance impact, this change allowed to drastically improve
> the idle time residency.
>
>
>                            |   Running   |  WFI [1]  |    Idle   |
>    ------------------------+-------------+-----------+-----------+
>    Little cluster (4 CPUs) |    -0.35%   |   +0.35%  |   +0.79%  |
>    ------------------------+-------------+-----------+-----------+
>    Medium cluster (3 CPUs) |    -6.3%    |    -18%   |    +12%   |
>    ------------------------+-------------+-----------+-----------+
>    Big cluster    (1 CPU)  |    -6.4%    |    -6.5%  |    +2.8%  |
>    ------------------------+-------------+-----------+-----------+
>
> On the SD855, the inefficient OPPs are found on the little cluster. By
> removing them from the Energy Model, we make the most efficient CPUs more
> appealing for task placement, helping to reduce the running time for the
> medium and big CPUs. Increasing idle time is crucial for this platform due
> to the substantial energy cost differences among the clusters. Also,
> despite not appearing in the statistics (the idle driver used here doesn't
> report it), we can speculate that we also improve the cluster idle time.
>
> [1] WFI: Wait for interrupt.
>
> Changelog since v3:
>   - New freq-table relation CPUFREQ_RELATION_E.
>   - New CPUFreq driver flag CPUFREQ_READ_ENERGY_MODEL.
>   - EM flag to skip or not inefficiencies (driven by CPUFreq).
>   - Fix infinite loop in set_freq_table_efficiencies().
>
> Changelog since v2:
>   - Add separated support for inefficiencies into CPUFreq.
>   - Collect Reviewed-by for the first patch.
>
> Changelog since v1:
>   - Remove the Look-up table as the numbers weren't strong enough to
>     justify the implementation.
>   - Split the patch.
>
> Vincent Donnefort (9):
>   PM / EM: Fix inefficient states detection
>   PM / EM: Mark inefficient states
>   PM / EM: Extend em_perf_domain with a flag field
>   PM / EM: Allow skipping inefficient states
>   cpufreq: Add an interface to mark inefficient frequencies
>   cpufreq: Add a new freq-table relation CPUFREQ_RELATION_E
>   cpufreq: CPUFREQ_RELATION_E in schedutil ondemand and conservative
>   cpufreq: Add driver flag CPUFREQ_READ_ENERGY_MODEL
>   cpufreq: dt: Add CPUFREQ_READ_ENERGY_MODEL

The cpufreq changes are mostly fine by me now, but I would like to
hear from Viresh regarding this.

>
>  drivers/cpufreq/cpufreq-dt.c           |  2 +-
>  drivers/cpufreq/cpufreq.c              | 67 ++++++++++++++++++++++++++++++++-
>  drivers/cpufreq/cpufreq_conservative.c |  2 +-
>  drivers/cpufreq/cpufreq_ondemand.c     |  4 +-
>  drivers/cpufreq/freq_table.c           | 57 +++++++++++++++++++++++++++-
>  include/linux/cpufreq.h                | 50 +++++++++++++++++++++++--
>  include/linux/energy_model.h           | 68 +++++++++++++++++++++++++++++-----
>  kernel/power/energy_model.c            | 46 ++++++++++++++---------
>  kernel/sched/cpufreq_schedutil.c       |  2 +-
>  9 files changed, 260 insertions(+), 38 deletions(-)
>
> --

  parent reply	other threads:[~2021-08-04 16:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 10:08 [PATCH v4 0/9] Inefficient OPPs Vincent Donnefort
2021-07-08 10:08 ` [PATCH v4 1/9] PM / EM: Fix inefficient states detection Vincent Donnefort
2021-07-08 10:08 ` [PATCH v4 2/9] PM / EM: Mark inefficient states Vincent Donnefort
2021-07-22  7:25   ` Lukasz Luba
2021-07-08 10:09 ` [PATCH v4 3/9] PM / EM: Extend em_perf_domain with a flag field Vincent Donnefort
2021-07-22  7:27   ` Lukasz Luba
2021-07-08 10:09 ` [PATCH v4 4/9] PM / EM: Allow skipping inefficient states Vincent Donnefort
2021-07-22 13:09   ` Lukasz Luba
2021-07-08 10:09 ` [PATCH v4 5/9] cpufreq: Add an interface to mark inefficient frequencies Vincent Donnefort
2021-07-08 10:09 ` [PATCH v4 6/9] cpufreq: Add a new freq-table relation CPUFREQ_RELATION_E Vincent Donnefort
2021-07-22  8:17   ` Lukasz Luba
2021-07-08 10:09 ` [PATCH v4 7/9] cpufreq: CPUFREQ_RELATION_E in schedutil ondemand and conservative Vincent Donnefort
2021-07-08 10:09 ` [PATCH v4 8/9] cpufreq: Add driver flag CPUFREQ_READ_ENERGY_MODEL Vincent Donnefort
2021-07-08 10:09 ` [PATCH v4 9/9] cpufreq: dt: Add CPUFREQ_READ_ENERGY_MODEL Vincent Donnefort
2021-08-04 16:21 ` Rafael J. Wysocki [this message]
2021-08-10  6:13   ` [PATCH v4 0/9] Inefficient OPPs Viresh Kumar
2021-08-10  7:39     ` Viresh Kumar
2021-08-10 12:28     ` Lukasz Luba
2021-08-10 14:07       ` Quentin Perret
2021-08-10 14:18         ` Lukasz Luba
2021-08-10 15:12           ` Lukasz Luba
2021-08-10 15:47             ` Quentin Perret
2021-08-11  5:03               ` Viresh Kumar
2021-08-11 11:38                 ` Lukasz Luba
2021-08-16 14:35                   ` Rafael J. Wysocki
2021-08-17  7:09                     ` Viresh Kumar
2021-08-11  4:01       ` Viresh Kumar
2021-08-16 14:19     ` Rafael J. Wysocki
2021-08-17  7:06       ` Viresh Kumar
2021-08-17  9:03         ` Lukasz Luba
2021-08-23 17:06           ` 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='CAJZ5v0jLzj48-Bu1-i4=r3aratJwRzVYuaPvycUb--4jKSRkHw@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mka@chromium.org \
    --cc=peterz@infradead.org \
    --cc=qperret@google.com \
    --cc=rjw@rjwysocki.net \
    --cc=vincent.donnefort@arm.com \
    --cc=vincent.guittot@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.