linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ashwin Chaugule <ashwin.chaugule@linaro.org>
To: viresh.kumar@linaro.org
Cc: dirk.brandewie@gmail.com, rwells@codeaurora.org,
	rjw@rjwysocki.net, linaro-acpi@lists.linaro.org,
	linux-pm@vger.kernel.org, Catalin.Marinas@arm.com,
	linda.knippers@hp.com,
	Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: [RFC PATCH v2 0/3] CPPC as PID backend
Date: Wed,  8 Oct 2014 16:11:01 -0400	[thread overview]
Message-ID: <1412799064-2339-1-git-send-email-ashwin.chaugule@linaro.org> (raw)

This patchset introduces CPPC(Collaborative Processor Performance Control) as a backend
to the PID governor. The PID governor from intel_pstate.c maps cleanly onto some CPPC
interfaces.
e.g. The CPU performance requests are made on a continuous scale as against discrete pstate
levels. The CPU performance feedback over an interval is gauged using platform specific
counters which are also described by CPPC.

Although CPPC describes several other registers to provide more hints to the platform,
Linux as of today does not have the infrastructure to make use of those registers.
Some of the CPPC specific information could be made available from the scheduler as
part of the CPUfreq and Scheduler intergration work. Until then PID can be used as the
front end for CPPC.

This implementation was tested using a Thinkpad X240 Laptop which seemed to have
CPPC and PCC tables in its ACPI firmware. However, it seems as though some addresses
pointed to by the tables do not exist. This patchset also shows the hacks that
were made in order to work around those limitations and test the control flow.

This patchset builds on top of the PCC driver which is being reviewed separately[3].

Changes since V1:
-	Create a new driver based on Dirks suggestion.
-	Fold in CPPC backend hooks into main driver.

Changes since V0: [1]
-	Split intel_pstate.c into a generic PID governor and platform specific backend.
-	Add CPPC accessors as PID backend.


CPPC:
====

CPPC (Collaborative Processor Performance Control) is a new way to control CPU
performance using an abstract continous scale as against a discretized P-state scale
which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
the basic operation involves:
- OS makes a CPU performance request. (Can provide min and max tolerable bounds)

- Platform (such as BMC) is free to optimize request within requested bounds depending
on power/thermal budgets etc.

- Platform conveys its decision back to OS

The communication between OS and platform occurs through another medium called (PCC)
Platform communication Channel. This is a generic mailbox like mechanism which includes
doorbell semantics to indicate register updates. The PCC driver is being discussed in a
separate patchset [3] and is not included here, since CPPC is only one client of PCC.

Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]

[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - http://comments.gmane.org/gmane.linux.acpi.devel/71171


Ashwin Chaugule (3):
  PCC HACKS: Update PCC comm region with MSR data
  CPPC as a PID controller backend
  CPPC HACKS

 drivers/cpufreq/Kconfig    |   12 +
 drivers/cpufreq/Makefile   |    1 +
 drivers/cpufreq/acpi_pid.c | 1085 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/mailbox/pcc.c      |  125 ++++-
 4 files changed, 1207 insertions(+), 16 deletions(-)
 create mode 100644 drivers/cpufreq/acpi_pid.c

-- 
1.9.1


             reply	other threads:[~2014-10-08 20:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 20:11 Ashwin Chaugule [this message]
2014-10-08 20:11 ` [RFC PATCH v2 1/3] PCC HACKS: Update PCC comm region with MSR data Ashwin Chaugule
2014-10-08 20:11 ` [RFC PATCH v2 2/3] CPPC as a PID controller backend Ashwin Chaugule
2014-10-09 16:22   ` Dirk Brandewie
2014-10-09 17:16     ` Ashwin Chaugule
2014-10-09 17:40       ` Dirk Brandewie
2014-10-09 18:18         ` Ashwin Chaugule
2014-10-17 13:58   ` Ashwin Chaugule
2014-10-08 20:11 ` [RFC PATCH v2 3/3] CPPC HACKS Ashwin Chaugule

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=1412799064-2339-1-git-send-email-ashwin.chaugule@linaro.org \
    --to=ashwin.chaugule@linaro.org \
    --cc=Catalin.Marinas@arm.com \
    --cc=dirk.brandewie@gmail.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linda.knippers@hp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rwells@codeaurora.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 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).