Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)

Philip Prindeville <philipp@redfish-solutions.com> Tue, 05 January 2021 03:40 UTC

Return-Path: <philipp@redfish-solutions.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B559E3A0E1A for <ntp@ietfa.amsl.com>; Mon, 4 Jan 2021 19:40:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dk0IzeeeUGEo for <ntp@ietfa.amsl.com>; Mon, 4 Jan 2021 19:40:45 -0800 (PST)
Received: from mail.redfish-solutions.com (mail.redfish-solutions.com [45.33.216.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 42D423A0E19 for <ntp@ietf.org>; Mon, 4 Jan 2021 19:40:45 -0800 (PST)
Received: from [192.168.3.4] ([192.168.3.4]) (authenticated bits=0) by mail.redfish-solutions.com (8.16.1/8.16.1) with ESMTPSA id 1053eeFb349741 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Jan 2021 20:40:40 -0700
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\))
From: Philip Prindeville <philipp@redfish-solutions.com>
In-Reply-To: <6a3a6032-29fa-d426-df3d-140bde4f0eca@rubidium.se>
Date: Mon, 04 Jan 2021 20:40:40 -0700
Cc: NTP WG <ntp@ietf.org>, Warner Losh <imp@bsdimp.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <FA39602B-038C-4844-9F10-82AAE4F8689A@redfish-solutions.com>
References: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net> <cecaf661-92af-8b35-4c53-2f025c928144@rubidium.se> <CANCZdfrURzZp5EoU8A-Q9K1tZN0DvLJ10a3ekQtvfrLJExuriA@mail.gmail.com> <cbfd20ae-7cc1-4ef8-0db4-540a11f64378@rubidium.se> <24EEF821-8ED9-46CF-8790-1DF63B102D76@redfish-solutions.com> <6a3a6032-29fa-d426-df3d-140bde4f0eca@rubidium.se>
To: Magnus Danielson <magnus@rubidium.se>
X-Mailer: Apple Mail (2.3654.40.0.2.32)
X-Scanned-By: MIMEDefang 2.84 on 192.168.1.3
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/fon487f5xAb2wVfZdBdZs19ZD00>
Subject: Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jan 2021 03:40:47 -0000


> On Jan 4, 2021, at 4:03 PM, Magnus Danielson <magnus@rubidium.se> wrote:
> 
> Philip,
> 
> On 2021-01-04 21:33, Philip Prindeville wrote:
>> 
>>> On Jan 4, 2021, at 1:21 PM, Magnus Danielson <magnus@rubidium.se> wrote:
>>> 
>>> Warner,
>>> 
>>> On 2021-01-04 19:29, Warner Losh wrote:
>>>> 
>>>> On Mon, Jan 4, 2021 at 9:34 AM Magnus Danielson <magnus@rubidium.se> wrote:
>>>>> It's not in NetBSD or FreeBSD.
>>>> Unfortunately not. However, that could probably be changed if enough
>>>> interest exists.
>>>> 
>>>> There were a number of issues with it in Linux.
>>> What issues are these that you refer to?
>>>> If there's a clearer definition of what it should be and how things should be updated as leap second knowledge evolves, I'd be happy to get it into FreeBSD...
>>> I think that part of the discussion is really not part of NTP WG discussion, but I am sure things can be figured out.
>>> 
>> Again, disagree.  I remember the days of the IETF where (1) a document describing a protocol was required, and (2) a successful “bake-off” demonstrating 3 unrelated interoperating implementations was equally required…
> 
> Which is fine if it was relevant, which it really isn't.
> 
> The details of how various implementations choose to do things is really
> not what the protocol should go into, but it is good that the protocol
> and details is done so the implementation becomes feasible. Wither the
> kernel use TAI only or can handle various time-scales in parallel is in
> my mind to very much degree an implementation detail.


It’s as relevant as it’s ever (always) been: the implementations are in theory to be written “blind” with only the proposed RFC to guide the developers.  If the RFC isn’t sufficiently clear for at least 3 implementations to converge on a common interpretation, then it’s not adequately explained.

I’m not talking about TAI being what the kernel uses; I’ve been talking about the on-the-wire canonical representation of time.


> There Linux and
> BSD can make different approaches with various benefits, and this is why
> you want at least two implementations, with assumed different
> implementation decisions, to bring it up on the standard track so that
> you learned something. There are many ways to implement things, and not
> all involve even the kernel to be involved at all. So, I think the
> discussion about how the kernel handling things in itself is not the NTP
> WG issue, other than showing it's feasible to do. If we agree that it's
> feasible, we move on.


That’s not what I was saying at all.  It was pointed out that the kernel uses UTC internally.

I replied pointing out that (1) it doesn’t matter what the kernel uses internally if applications can get whatever time they need through run-time support (i.e. libraries like libc) and (2) internally the Linux kernel at least (and I figure most POSIX compliant kernels) are capable of maintaining multiple timescales.  As long as whatever the clock runs in natively can be converted unambiguously into any other format, it doesn’t matter which is used.

For the sake of the kernel, the notion (or distinction) of days, years, and leap-days seems to be arbitrary or even irrelevant.

All the kernel really cares about is maintaining accurate, stable, unambiguous time which can then be converted to the timescale being requested by a process in user-space.

And because of this freedom, NTP can use whatever timescale it wants on-the-wire… and the kernel can likewise independently use whatever timescale it wants to use internally… as long as there’s a mechanism to convert to whatever applications want.

I hear people repeating that the kernel, the protocol, and applications all need to use the same timescale.  They don’t.  This is a fallacy.

-Philip



> If someone has an issue for another way to
> implement, sure we try to resolve that. The WG should however not
> specify how that should be done, and that was the actual question at
> hand which I discussed.
> 
>> FreeBSD is as good a platform as any to demonstrate one of those implementations.
> 
> For sure. That was not the topic at all.
> 
> Cheers,
> Magnus