linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to the OPP library
@ 2018-01-19  9:45 Quentin Perret
  2018-01-19  9:45 ` [PATCH v3 1/2] PM / OPP: introduce an OPP power estimation helper Quentin Perret
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Quentin Perret @ 2018-01-19  9:45 UTC (permalink / raw)
  To: linux-pm
  Cc: rjw, vireshk, nm, sboyd, sudeep.holla, amit.kachhap, javi.merino,
	rui.zhang, edubezval, matthias.bgg, dietmar.eggemann,
	morten.rasmussen, patrick.bellasi, ionela.voinescu, joelaf, tkjos,
	Quentin Perret

Hi,

Currently, IPA estimates the power dissipated by a CPU at each available OPP
using its capacitance (the dynamic-power-coefficient DT binding). This series
relocates this per-OPP power model in the OPP core as a preparation for
future changes. More specifically:

   1. The current DT-based approach for power estimation will need deep
      changes to support SCMI-provided power values. While the thermal
      subsystem is not necessarily the best place to hide multiple power
      estimation methods, the OPP library appears to be a good candidate to
      implement the required platform abstraction and respect the existing
      design (the thermal subsystem already relies on the OPP library to
      provide voltages no matter where they come from -- DT or SCPI).

   2. The energy models of CPUs will be needed by other clients in the future
      (such as the task scheduler or CPUFreq governors for example) in order
      to make energy-aware decisions. The relocation to the OPP library will
      enable code re-use and all clients will benefit form the platform
      abstraction mentioned previously.

As mentionned during the review of V1, this series will have a chance to get
merged only when the clients (the scheduler, or the SCMI driver) depending
on it are ready to be merged as well. This V3 is here for reference and
addresses the main changes requested on the previous versions.

Changes in v2:
 - Changed the OPP power estimation to be done upon OPP creation (V. Kumar)
 - Updated the cover letter to motivate the choice of PM OPP (E. Valentin)

Changes in v3
 - Removed the has_power logic to simplify the thermal code (V. Kumar)
 - Moved _opp_estimate_power() call to _opp_add() to avoid duplication (V. Kumar)

Quentin Perret (2):
  PM / OPP: introduce an OPP power estimation helper
  thermal: cpu_cooling: use power models from the OPP library

 drivers/opp/core.c            | 32 +++++++++++++++++++++++++
 drivers/opp/of.c              | 11 +++++----
 drivers/opp/opp.h             |  7 ++++++
 drivers/thermal/cpu_cooling.c | 56 ++++++++++++++++---------------------------
 include/linux/pm_opp.h        |  7 ++++++
 5 files changed, 74 insertions(+), 39 deletions(-)

-- 
2.15.1

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

end of thread, other threads:[~2018-01-23  2:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19  9:45 [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to the OPP library Quentin Perret
2018-01-19  9:45 ` [PATCH v3 1/2] PM / OPP: introduce an OPP power estimation helper Quentin Perret
2018-01-19 23:36   ` Joel Fernandes
2018-01-22  5:12     ` Viresh Kumar
2018-01-22 10:00     ` Quentin Perret
2018-01-20  4:10   ` Joel Fernandes
2018-01-22  9:56     ` Quentin Perret
2018-01-22 21:33       ` Joel Fernandes
2018-01-19  9:45 ` [PATCH v3 2/2] thermal: cpu_cooling: use power models from the OPP library Quentin Perret
2018-01-19 23:15   ` Joel Fernandes
2018-01-22  5:11     ` Viresh Kumar
2018-01-22 21:30       ` Joel Fernandes
2018-01-23  2:47         ` Viresh Kumar
2018-01-22 11:03     ` Quentin Perret
2018-01-19 10:12 ` [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to " Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).