Skip to content

Commit

Permalink
timekeeping: Move clock sync work to power efficient workqueue
Browse files Browse the repository at this point in the history
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: Shaibal Dutta <[email protected]>
[[email protected]: Added commit message. Aligned code.]
Signed-off-by: Zoran Markovic <[email protected]>
Cc: John Stultz <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
Shaibal Dutta authored and KAGA-KOKO committed Feb 7, 2014
1 parent 38dbfb5 commit e8b1759
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,13 @@ static void sync_cmos_clock(struct work_struct *work)
next.tv_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)
{
schedule_delayed_work(&sync_cmos_work, 0);
queue_delayed_work(system_power_efficient_wq, &sync_cmos_work, 0);
}

#else
Expand Down

0 comments on commit e8b1759

Please sign in to comment.