aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-04-08 07:15:40 -0400
committerTejun Heo <tj@kernel.org>2013-05-14 13:50:06 -0400
commitcee22a15052faa817e3ec8985a28154d3fabc7aa (patch)
tree506028de7bd3bf7de08a7933b5601355f27c5262 /kernel/power
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues
Workqueues can be performance or power-oriented. Currently, most workqueues are bound to the CPU they were created on. This gives good performance (due to cache effects) at the cost of potentially waking up otherwise idle cores (Idle from scheduler's perspective. Which may or may not be physically idle) just to process some work. To save power, we can allow the work to be rescheduled on a core that is already awake. Workqueues created with the WQ_UNBOUND flag will allow some power savings. However, we don't change the default behaviour of the system. To enable power-saving behaviour, a new config option CONFIG_WQ_POWER_EFFICIENT needs to be turned on. This option can also be overridden by the workqueue.power_efficient boot parameter. tj: Updated config description and comments. Renamed CONFIG_WQ_POWER_EFFICIENT to CONFIG_WQ_POWER_EFFICIENT_DEFAULT. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/Kconfig20
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 5dfdc9ea180b..46455961a88f 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -263,6 +263,26 @@ config PM_GENERIC_DOMAINS
263 bool 263 bool
264 depends on PM 264 depends on PM
265 265
266config WQ_POWER_EFFICIENT_DEFAULT
267 bool "Enable workqueue power-efficient mode by default"
268 depends on PM
269 default n
270 help
271 Per-cpu workqueues are generally preferred because they show
272 better performance thanks to cache locality; unfortunately,
273 per-cpu workqueues tend to be more power hungry than unbound
274 workqueues.
275
276 Enabling workqueue.power_efficient kernel parameter makes the
277 per-cpu workqueues which were observed to contribute
278 significantly to power consumption unbound, leading to measurably
279 lower power usage at the cost of small performance overhead.
280
281 This config option determines whether workqueue.power_efficient
282 is enabled by default.
283
284 If in doubt, say N.
285
266config PM_GENERIC_DOMAINS_SLEEP 286config PM_GENERIC_DOMAINS_SLEEP
267 def_bool y 287 def_bool y
268 depends on PM_SLEEP && PM_GENERIC_DOMAINS 288 depends on PM_SLEEP && PM_GENERIC_DOMAINS