From: Ashwin Chaugule <ashwin.chaugule@linaro.org>
To: dirk.j.brandewie@intel.com
Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org,
Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: [RFC v1 0/6] CPPC as a PID backend
Date: Tue, 9 Sep 2014 18:12:02 -0400 [thread overview]
Message-ID: <1410300728-26637-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.
Beyond code restructuring and renaming, this patchset does not change the logic from the
intel_pstate.c driver. Kernel compilation times were compared with the original intel_pstate.c,
intel backend(intel_pid_ctrl.c) and the CPPC backend and no significant overheads were noticed.
Testing was performed on a Thinkpad X240 laptop.
PID_CTRL + INTEL_PSTATE:
=======================
real 5m37.742s
user 18m42.575s
sys 1m0.521s
PID_CTRL + CPPC_PID_CTRL:
========================
real 5m48.321s
user 18m24.487s
sys 0m59.327s
ORIGINAL INTEL_PSTATE:
======================
real 5m40.642s
user 18m37.411s
sys 1m0.185s
The complete patchset including the PCC hacks used for testing is available in [4].
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/70299
[4] - http://git.linaro.org/people/ashwin.chaugule/leg-kernel.git/shortlog/refs/heads/cppc-pid-no_freq_domain
Ashwin Chaugule (6):
PID Controller governor
PID: Move Turbo detection into backend driver
PID: Move Baytrail specific accessors into backend driver
PID: Add new function pointers to read multiple registers
PID: Rename counters to make them more generic
PID: Add CPPC (Collaborative Processor Performance) backend driver
Documentation/cpu-freq/intel-pstate.txt | 43 --
Documentation/cpu-freq/pid_ctrl.txt | 41 ++
drivers/cpufreq/Kconfig | 19 +
drivers/cpufreq/Kconfig.x86 | 2 +-
drivers/cpufreq/Makefile | 4 +-
drivers/cpufreq/cppc_pid_ctrl.c | 406 +++++++++++++
drivers/cpufreq/intel_pid_ctrl.c | 408 +++++++++++++
drivers/cpufreq/intel_pstate.c | 1012 -------------------------------
drivers/cpufreq/pid_ctrl.c | 615 +++++++++++++++++++
drivers/cpufreq/pid_ctrl.h | 113 ++++
10 files changed, 1606 insertions(+), 1057 deletions(-)
delete mode 100644 Documentation/cpu-freq/intel-pstate.txt
create mode 100644 Documentation/cpu-freq/pid_ctrl.txt
create mode 100644 drivers/cpufreq/cppc_pid_ctrl.c
create mode 100644 drivers/cpufreq/intel_pid_ctrl.c
delete mode 100644 drivers/cpufreq/intel_pstate.c
create mode 100644 drivers/cpufreq/pid_ctrl.c
create mode 100644 drivers/cpufreq/pid_ctrl.h
--
1.9.1
next reply other threads:[~2014-09-09 22:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 22:12 Ashwin Chaugule [this message]
2014-09-09 22:12 ` [PATCH 1/6] PID Controller governor Ashwin Chaugule
2014-09-09 22:12 ` [PATCH 2/6] PID: Move Turbo detection into backend driver Ashwin Chaugule
2014-09-09 22:12 ` [PATCH 3/6] PID: Move Baytrail specific accessors " Ashwin Chaugule
2014-09-09 22:12 ` [PATCH 4/6] PID: Add new function pointers to read multiple registers Ashwin Chaugule
2014-09-09 22:12 ` [PATCH 5/6] PID: Rename counters to make them more generic Ashwin Chaugule
2014-09-09 22:12 ` [PATCH 6/6] PID: Add CPPC (Collaborative Processor Performance) backend driver Ashwin Chaugule
2014-09-10 15:44 ` [RFC v1 0/6] CPPC as a PID backend Dirk Brandewie
2014-09-10 16:11 ` Ashwin Chaugule
2014-09-10 17:31 ` Dirk Brandewie
2014-09-10 18:21 ` 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=1410300728-26637-1-git-send-email-ashwin.chaugule@linaro.org \
--to=ashwin.chaugule@linaro.org \
--cc=dirk.j.brandewie@intel.com \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).