[PATCH 0/6] CPUoffline framework
Mike Turquette
mturquette at ti.com
Fri Aug 19 19:38:13 UTC 2011
This series is posted for posterity. It has been NAK'd by the community
since CPU hotplug has been deemed an inappropriate mechanism for power
capping.
CPUoffline is a framework for taking CPU's offline via the hotplug
mechanism. The framework itself is quite straightforward: a driver
arranges the CPUs into partitions. Each partition is associated to a
governor thread and that thread implements a policy for taking CPUs in
that partition offline or online, based on some heuristic.
The CPUoffline core code includes a default driver that places all
possible CPUs into a single partition, requiring no code to be written
for a new platform. There is also a single governor named "avgload"
which looks at the average load of all of the *online* CPUs in a
partition and makes a hotplug decision based on defined thresholds.
This framework owes a lot to CPUfreq and CPUidle, from which CPUoffline
stole^H^H^H^H^H borrowed lots of code.
Note: since development was cut short to community response, there are
some missing infrastructure bits such as module unregistration and
dynamic govenor switching. The code does work fine as-is for the
curious-minded who want to test on an SMP system that supports hotplug.
Mike Turquette (6):
ARM: do not mark CPU 0 as hotpluggable
cpumask: introduce cpumask for hotpluggable CPUs
cpu: update cpu_hotpluggable_mask in register_cpu
cpuoffline core
governors
arm kconfig
arch/arm/Kconfig | 2 +
arch/arm/kernel/setup.c | 3 +-
drivers/Makefile | 1 +
drivers/base/cpu.c | 4 +-
drivers/cpuoffline/Kconfig | 26 ++
drivers/cpuoffline/Makefile | 2 +
drivers/cpuoffline/cpuoffline.c | 488 ++++++++++++++++++++++++++++++++
drivers/cpuoffline/governors/Kconfig | 9 +
drivers/cpuoffline/governors/Makefile | 2 +
drivers/cpuoffline/governors/avgload.c | 255 +++++++++++++++++
include/linux/cpumask.h | 27 ++-
include/linux/cpuoffline.h | 82 ++++++
kernel/cpu.c | 18 ++
13 files changed, 912 insertions(+), 7 deletions(-)
create mode 100644 drivers/cpuoffline/Kconfig
create mode 100644 drivers/cpuoffline/Makefile
create mode 100644 drivers/cpuoffline/cpuoffline.c
create mode 100644 drivers/cpuoffline/governors/Kconfig
create mode 100644 drivers/cpuoffline/governors/Makefile
create mode 100644 drivers/cpuoffline/governors/avgload.c
create mode 100644 include/linux/cpuoffline.h
--
1.7.4.1
More information about the linaro-dev
mailing list