From: Richard Cochran <richardcochran@gmail.com>
To: John Stultz <john.stultz@linaro.org>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/1] ntp: advertise correct TAI offset during leap second
Date: Tue, 1 May 2012 08:16:05 +0200 [thread overview]
Message-ID: <20120501061605.GC2243@netboy.at.omicron.at> (raw)
In-Reply-To: <4F9EEC86.8010201@linaro.org>
On Mon, Apr 30, 2012 at 12:48:22PM -0700, John Stultz wrote:
> On 04/27/2012 11:17 PM, Richard Cochran wrote:
> >
> >Wait a minute. If user space manages this variable, then shouldn't the
> >kernel leave it alone?
>
> Right. That's why I'm asking. I actually haven't spent much time
> looking at how the tai value provided via adjtimex is handled, and I
> want to make sure its ok if we modify it from the kernel.
We *are* already modifying it in kernel, but at the wrong time.
I don't know either what ntpd does, but I will find out.
[ But if ntpd just uses adjtimex() to use the kernel as storage for
variables, then that is really stupid. ]
> >This David Mills paper [1] gives a leap second example that does it
> >the "other" way from Linux (see Figure 4), repeating the new epoch
> >rather than the leap second. It may well be that ntp.org servers do
> >behave that way. However, the NIST file claims that this way is
> >unusual.
> >
> >So, you have a good question. But, if ntp.org uses the NIST second
> >method, shouldn't Linux do the same?
> >
> Not sure I'm following here. In Linux 23:59:60 is represented as
> 23:59:59 + TIME_OOP. Could you expand on what in particular is
> inconsistent here?
I am talking about the numerical values of time_t. The NIST note
explains it well. There are two ways to insert a leap second, and
neither way is specified by any standard, or at least I think that is
what the note is saying.
So you can have either sequences [1] or [2] during a leap second, but
not [3], which is what you are doing. The Mills paper has a table that
looks like [2], but the NIST note says that is not usual. So, I wonder
what ntpd broadcasts during a leap second.
NTP OFF TAI UTC STATUS
[1] ----------------------------------------------------
2287785598 10 78796808 78796798 ins
2287785599 10 78796809 78796799 ins
2287785599 11 78796810 78796799 oop
2287785600 11 78796811 78796800 wait
2287785601 11 78796812 78796801 wait
[2] ----------------------------------------------------
2287785598 10 78796808 78796798 ins
2287785599 10 78796809 78796799 ins
2287785600 10 78796810 78796800 oop
2287785600 11 78796811 78796800 wait
2287785601 11 78796812 78796801 wait
[3] ----------------------------------------------------
2287785598 10 78796808 78796798 ins
2287785599 10 78796809 78796799 ins
2287785599 10 78796809 * 78796799 oop
2287785600 11 78796811 * 78796800 wait
2287785601 11 78796812 78796801 wait
* Notice apparent jump in TAI value.
Thanks,
Richard
next prev parent reply other threads:[~2012-05-01 6:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 12:11 [PATCH 0/1] ntp bug fix Richard Cochran
2012-04-26 12:11 ` [PATCH 1/1] ntp: advertise correct TAI offset during leap second Richard Cochran
2012-04-27 22:23 ` John Stultz
2012-04-28 6:17 ` Richard Cochran
2012-04-30 19:48 ` John Stultz
2012-05-01 6:16 ` Richard Cochran [this message]
2012-05-05 10:02 ` Richard Cochran
2012-05-05 19:27 ` John Stultz
2012-05-03 18:54 ` John Stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120501061605.GC2243@netboy.at.omicron.at \
--to=richardcochran@gmail.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.