Re: Leap Second, nohz, and ABSOLUTE timers problem

From: John Stultz
Date: Wed May 27 2015 - 19:09:40 EST


On Wed, May 27, 2015 at 7:55 AM, Prarit Bhargava <prarit@xxxxxxxxxx> wrote:
> John,
>
> We've identified an issue with ABSOLUTE timers and the leap second that
> effects, AFAICT, all kernels.
>
> This is the scenario. Suppose you have a userspace program that has an
> ABSOLUTE timer that will expire @ midnight (00:00:00) UTC. The timer expiry
> should occur at the end of the leap second event but it does not always occur
> at the end. In fact it may occur during the leap second event and effectively
> one second too early.
>
> In the NOHZ kernel, timers are not necessarily aligned to the ticks the
> following does happen in userspace:

Hrm.. Thanks for the report! Looks like this could happen on !NOHZ as
well, and is an artifact of the fact the leapsecond is being applied
by a timer.

I'm working on a patch and will send it out shortly.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/