Commit c2b59d27 authored by Jeson Gao's avatar Jeson Gao Committed by Zhang Rui

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: default avatarJeson Gao <jeson.gao@unisoc.com>
Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 3c587768
...@@ -290,10 +290,12 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, ...@@ -290,10 +290,12 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
int delay) int delay)
{ {
if (delay > 1000) if (delay > 1000)
mod_delayed_work(system_freezable_wq, &tz->poll_queue, mod_delayed_work(system_freezable_power_efficient_wq,
&tz->poll_queue,
round_jiffies(msecs_to_jiffies(delay))); round_jiffies(msecs_to_jiffies(delay)));
else if (delay) else if (delay)
mod_delayed_work(system_freezable_wq, &tz->poll_queue, mod_delayed_work(system_freezable_power_efficient_wq,
&tz->poll_queue,
msecs_to_jiffies(delay)); msecs_to_jiffies(delay));
else else
cancel_delayed_work(&tz->poll_queue); cancel_delayed_work(&tz->poll_queue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment