linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Perret <quentin.perret@arm.com>
To: linux-pm@vger.kernel.org
Cc: rjw@rjwysocki.net, vireshk@kernel.org, nm@ti.com,
	sboyd@codeaurora.org, sudeep.holla@arm.com,
	amit.kachhap@gmail.com, javi.merino@kernel.org,
	rui.zhang@intel.com, edubezval@gmail.com, matthias.bgg@gmail.com,
	dietmar.eggemann@arm.com, morten.rasmussen@arm.com,
	patrick.bellasi@arm.com, ionela.voinescu@arm.com,
	joelaf@google.com, tkjos@google.com,
	Quentin Perret <quentin.perret@arm.com>
Subject: [PATCH v3 0/2] thermal, OPP: move the CPU power estimation to the OPP library
Date: Fri, 19 Jan 2018 09:45:47 +0000	[thread overview]
Message-ID: <20180119094549.5468-1-quentin.perret@arm.com> (raw)

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

             reply	other threads:[~2018-01-19  9:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  9:45 Quentin Perret [this message]
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

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=20180119094549.5468-1-quentin.perret@arm.com \
    --to=quentin.perret@arm.com \
    --cc=amit.kachhap@gmail.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=edubezval@gmail.com \
    --cc=ionela.voinescu@arm.com \
    --cc=javi.merino@kernel.org \
    --cc=joelaf@google.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=morten.rasmussen@arm.com \
    --cc=nm@ti.com \
    --cc=patrick.bellasi@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=sboyd@codeaurora.org \
    --cc=sudeep.holla@arm.com \
    --cc=tkjos@google.com \
    --cc=vireshk@kernel.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 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).