Skip to content

Commit e8b1759

Browse files
Shaibal DuttaKAGA-KOKO
authored andcommitted
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: 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]>
1 parent 38dbfb5 commit e8b1759

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/time/ntp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,13 @@ static void sync_cmos_clock(struct work_struct *work)
514514
next.tv_sec++;
515515
next.tv_nsec -= NSEC_PER_SEC;
516516
}
517-
schedule_delayed_work(&sync_cmos_work, timespec_to_jiffies(&next));
517+
queue_delayed_work(system_power_efficient_wq,
518+
&sync_cmos_work, timespec_to_jiffies(&next));
518519
}
519520

520521
void ntp_notify_cmos_timer(void)
521522
{
522-
schedule_delayed_work(&sync_cmos_work, 0);
523+
queue_delayed_work(system_power_efficient_wq, &sync_cmos_work, 0);
523524
}
524525

525526
#else

0 commit comments

Comments
 (0)