]> git.baikalelectronics.ru Git - kernel.git/commit
powercap / idle_inject: Add an idle injection framework
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 26 Jun 2018 10:53:29 +0000 (12:53 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 2 Jul 2018 11:00:24 +0000 (13:00 +0200)
commit4bd3a687b59631ee3f85ed661b41bbcf6b83025d
tree216d5d099fb48994f41e71e3bbf7b9ae742cea57
parent749c65c1b38017c420ee0efe4cf766101be057ac
powercap / idle_inject: Add an idle injection framework

Initially, the cpu_cooling device for ARM was changed by adding a new
policy inserting idle cycles. The intel_powerclamp driver does a
similar action.

Instead of implementing idle injections privately in the cpu_cooling
device, move the idle injection code in a dedicated framework and give
the opportunity to other frameworks to make use of it.

The framework relies on the smpboot kthreads which handles via its
main loop the common code for hotplugging and [un]parking.

This code was previously tested with the cpu cooling device and went
through several iterations. It results now in split code and API
exported in the header file. It was tested with the cpu cooling device
with success.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Rewrite of all comments ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/Kconfig
drivers/powercap/Makefile
drivers/powercap/idle_inject.c [new file with mode: 0644]
include/linux/idle_inject.h [new file with mode: 0644]