Commit e8b17594 authored by Shaibal Dutta's avatar Shaibal Dutta Committed by Thomas Gleixner

timekeeping: Move clock sync work to power efficient workqueue

For better use of CPU idle time, allow the scheduler to select the CPU
on which the CMOS clock sync work would be scheduled. This improves
idle residency time and conserver power.

This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.
Signed-off-by: default avatarShaibal Dutta <shaibal.dutta@broadcom.com>
[zoran.markovic@linaro.org: Added commit message. Aligned code.]
Signed-off-by: default avatarZoran Markovic <zoran.markovic@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/1391195904-12497-1-git-send-email-zoran.markovic@linaro.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 38dbfb59
...@@ -514,12 +514,13 @@ static void sync_cmos_clock(struct work_struct *work) ...@@ -514,12 +514,13 @@ static void sync_cmos_clock(struct work_struct *work)
next.tv_sec++; next.tv_sec++;
next.tv_nsec -= NSEC_PER_SEC; next.tv_nsec -= NSEC_PER_SEC;
} }
schedule_delayed_work(&sync_cmos_work, timespec_to_jiffies(&next)); queue_delayed_work(system_power_efficient_wq,
&sync_cmos_work, timespec_to_jiffies(&next));
} }
void ntp_notify_cmos_timer(void) void ntp_notify_cmos_timer(void)
{ {
schedule_delayed_work(&sync_cmos_work, 0); queue_delayed_work(system_power_efficient_wq, &sync_cmos_work, 0);
} }
#else #else
......
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