diff options
author | Jeson Gao <jeson.gao@unisoc.com> | 2018-09-04 03:14:08 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2018-10-10 09:48:50 -0400 |
commit | c2b59d279dbbac750958f6a1bc4841e431d934e3 (patch) | |
tree | 888dee70bdfba3f0812a3943ea488b2e40fbfe58 | |
parent | 3c587768271e9c20276522025729e4ebca51583b (diff) |
thermal: core: using power_efficient_wq for thermal worker
For SMP systems, thermal worker should use power_efficient_wq in power
saving mode, that will make scheduler more flexible on selecting an active
core for running work handler to avoid keeping work handler always
running on a single core, that will save some power.
Even if 'power_efficient_wq' relevant configs are disabled
'system_freezable_power_efficient_wq' is identical to system_freezable_wq,
behavior is unchanged.
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/thermal_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 441778100887..d6ebc1cf6aa9 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
@@ -290,10 +290,12 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, | |||
290 | int delay) | 290 | int delay) |
291 | { | 291 | { |
292 | if (delay > 1000) | 292 | if (delay > 1000) |
293 | mod_delayed_work(system_freezable_wq, &tz->poll_queue, | 293 | mod_delayed_work(system_freezable_power_efficient_wq, |
294 | &tz->poll_queue, | ||
294 | round_jiffies(msecs_to_jiffies(delay))); | 295 | round_jiffies(msecs_to_jiffies(delay))); |
295 | else if (delay) | 296 | else if (delay) |
296 | mod_delayed_work(system_freezable_wq, &tz->poll_queue, | 297 | mod_delayed_work(system_freezable_power_efficient_wq, |
298 | &tz->poll_queue, | ||
297 | msecs_to_jiffies(delay)); | 299 | msecs_to_jiffies(delay)); |
298 | else | 300 | else |
299 | cancel_delayed_work(&tz->poll_queue); | 301 | cancel_delayed_work(&tz->poll_queue); |