All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/9] Inefficient OPPs
@ 2021-09-08 14:05 Vincent Donnefort
  2021-09-08 14:05 ` [PATCH v7 1/9] PM / EM: Fix inefficient states detection Vincent Donnefort
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Vincent Donnefort @ 2021-09-08 14:05 UTC (permalink / raw)
  To: rjw, viresh.kumar, vincent.guittot, qperret
  Cc: linux-pm, ionela.voinescu, lukasz.luba, dietmar.eggemann, mka,
	Vincent Donnefort

Hi all,

Here's the new version for the inefficient OPPs. This patch-set is based on the
following series from Viresh:

  [PATCH V3 0/9] Add callback to register with energy model
  https://lore.kernel.org/linux-arm-msm/cover.1628742634.git.viresh.kumar@linaro.org/

The main change in this version is the re-introduction of CPUFREQ_RELATION_E,
as a relation flag. When set, all relations will try to resolve a frequency
across efficient frequencies only.

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 v6:
  - Bring back CPUFREQ_RELATION_E as a relation flag.
  - Make the policy min/max hard limits.
  - Remove the "efficient" member from the freq_table that was pointing to the
    next efficient frequency.

Changelog since v5:
  - EM setup inefficient frequencies in CPUFreq, instead of CPUFreq settings its
    own inefficient frequencies from EM.

Changelog since v4:
  - Remove CPUFREQ_RELATION_E.
  - Skip inefficient OPPs for all governors with CPUFREQ_GOV_DYNAMIC_SWITCHING
  - Remove CPUFREQ_READ_ENERGY_MODEL in favor of the register_em callback.

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


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: Make policy min/max hard requirements
  cpufreq: Add an interface to mark inefficient frequencies
  cpufreq: Introducing CPUFREQ_RELATION_E
  cpufreq: Use CPUFREQ_RELATION_E in DVFS governors
  PM / EM: Mark inefficiencies in CPUFreq

 drivers/cpufreq/acpi-cpufreq.c         |   3 +-
 drivers/cpufreq/amd_freq_sensitivity.c |   3 +-
 drivers/cpufreq/cpufreq.c              |  19 +++-
 drivers/cpufreq/cpufreq_conservative.c |   6 +-
 drivers/cpufreq/cpufreq_ondemand.c     |  16 ++--
 drivers/cpufreq/powernv-cpufreq.c      |   4 +-
 drivers/cpufreq/s5pv210-cpufreq.c      |   2 +-
 include/linux/cpufreq.h                | 169 ++++++++++++++++++++++++++-------
 include/linux/energy_model.h           |  68 +++++++++++--
 kernel/power/energy_model.c            |  86 +++++++++++++----
 10 files changed, 301 insertions(+), 75 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-10-05 14:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 14:05 [PATCH v7 0/9] Inefficient OPPs Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 1/9] PM / EM: Fix inefficient states detection Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 2/9] PM / EM: Mark inefficient states Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 3/9] PM / EM: Extend em_perf_domain with a flag field Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 4/9] PM / EM: Allow skipping inefficient states Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 5/9] cpufreq: Make policy min/max hard requirements Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 6/9] cpufreq: Add an interface to mark inefficient frequencies Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 7/9] cpufreq: Introducing CPUFREQ_RELATION_E Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 8/9] cpufreq: Use CPUFREQ_RELATION_E in DVFS governors Vincent Donnefort
2021-09-08 14:05 ` [PATCH v7 9/9] PM / EM: Mark inefficiencies in CPUFreq Vincent Donnefort
2021-10-04  9:25 ` [PATCH v7 0/9] Inefficient OPPs Viresh Kumar
2021-10-05 14:34   ` Rafael J. Wysocki

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.