lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC][PATCH 0/4] Fixes for leapsecond expiring early ABS_TIME CLOCK_REALTIME timers
Date
As Prarit reported here:
https://lkml.org/lkml/2015/5/27/458

Since the leapsecond is applied at timer tick time, and not
the actual second edge, ABS_TIME CLOCK_REALTIME timers set for
right after the leapsecond could fire a second early, since
some timers may be expired before we trigger the timekeeping
timer, which then applies the leapsecond.

Thus this patch series tries to address this isssue, including
extending the leap-a-day test to catch this problem, as well
as other relevant fixups I found while working on the code.

This series has only had limited testing, so I wanted to send
it out for initial review and comment. Folks can grab this tree
via git for testing here:
https://git.linaro.org/people/john.stultz/linux.git dev/early-leap-timer

Thougths and feedback would be appreciated!
thanks
-john

Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>

John Stultz (4):
selftests: timers: Add leap-second timer edge testing to leap-a-day.c
timer_list: Add the base offset so remaining nsecs are accurate for
non monotonic timers
ntp: Use printk_deferred in leapsecond path
time: Do leapsecond adjustment in gettime fastpaths

include/linux/time64.h | 1 +
include/linux/timekeeper_internal.h | 7 +++
kernel/time/ntp.c | 77 ++++++++++++++++++++---
kernel/time/ntp_internal.h | 1 +
kernel/time/timekeeping.c | 97 +++++++++++++++++++++++++----
kernel/time/timer_list.c | 2 +-
tools/testing/selftests/timers/leap-a-day.c | 76 ++++++++++++++++++++--
7 files changed, 234 insertions(+), 27 deletions(-)

--
1.9.1



\
 
 \ /
  Last update: 2015-05-29 23:01    [W:0.654 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site