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

Magnus Danielson <magnus@rubidium.se> Mon, 04 January 2021 16:34 UTC

Return-Path: <magnus@rubidium.se>
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 B08843A0E63 for <ntp@ietfa.amsl.com>; Mon, 4 Jan 2021 08:34:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.461
X-Spam-Level:
X-Spam-Status: No, score=-0.461 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.262, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rubidium.se
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 NAWgfMCNcrkU for <ntp@ietfa.amsl.com>; Mon, 4 Jan 2021 08:34:29 -0800 (PST)
Received: from pio-pvt-msa1.bahnhof.se (pio-pvt-msa1.bahnhof.se [79.136.2.40]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5C0913A0E4A for <ntp@ietf.org>; Mon, 4 Jan 2021 08:34:29 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 4BE563F5C4 for <ntp@ietf.org>; Mon, 4 Jan 2021 17:34:27 +0100 (CET)
Authentication-Results: pio-pvt-msa1.bahnhof.se; dkim=pass (2048-bit key; secure) header.d=rubidium.se header.i=@rubidium.se header.b="JH9dQfAD"; dkim-atps=neutral
X-Virus-Scanned: Debian amavisd-new at bahnhof.se
Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z6wNV4kqFv0w for <ntp@ietf.org>; Mon, 4 Jan 2021 17:34:25 +0100 (CET)
Received: by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 58A823F5AB for <ntp@ietf.org>; Mon, 4 Jan 2021 17:34:25 +0100 (CET)
Received: from machine.local (unknown [192.168.0.15]) by magda-gw (Postfix) with ESMTPSA id BB9409A052B; Mon, 4 Jan 2021 17:34:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rubidium.se; s=rubidium; t=1609778064; bh=UItfrfpKzbe4FbqXpuKwcT1EoWHX2Lj1T2gzJzvqWkM=; h=Cc:Subject:To:References:From:Date:In-Reply-To:From; b=JH9dQfADB5sE23SJkdd0Rg9s1btL6PLGxoBvT0SKt37uH60y8dIvoyXMSthG8Xpuz YivBEnZrmFKIekrsko18HSL1NVbj/wwOkTcznwnplAf2qcxMILiFjEhmlUYXRAWTDo TTFttbUwPFWskHVpmxcsdauRL6T9LaOfcF4EA8y+9dirpYLydB7DRQH3hvlrIW1t2O NDPwHdafrFyorGFIRjUQXwaRmrBEs60V3p2/BUrywUizZ+7v/AmBpr0lalg6tyTSM/ zWPcnyY0QFhOcCKFBwycfFiNt0kx/WWB/ZySyHy8ruQ/tQ3kyluflxhQ21owQpE4C7 swJuHvnVvdJvA==
Cc: magnus@rubidium.se
To: ntp@ietf.org
References: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net>
From: Magnus Danielson <magnus@rubidium.se>
Message-ID: <cecaf661-92af-8b35-4c53-2f025c928144@rubidium.se>
Date: Mon, 04 Jan 2021 17:34:21 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/LjxGtkBieQyQVhUKJD6QxbssVjM>
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: Mon, 04 Jan 2021 16:34:33 -0000

Hi Hal,

On 2021-01-02 09:16, Hal Murray wrote:
>>> My (Linux) man page has various options for clock_gettime(), but
>>> it doesn't say anything about leap seconds or TAI.  Yes, it should be
>>> reasonable to add, but it's not there yet.
>> Which only says that you should not trust your decision-making on what the
>> man-page for a single command, it's not telling you the full story.
>> So, there is CLOCK_TAI for starters. Then you also need to look at the
>> nanokernel support, which is there, and the leap-second handling, leap-second
>> information it does keep in the kernel. It's been there for fairly long now,
>> that we can consider the Linux kernel to support it for all the versions we
>> consider. All we need to do is keep supplying it with correct time and
>> correct leap-second information.
> Thanks for the heads up.
Happy to assist!
> It's been in the Linux kernel for years.
>        CLOCK_TAI (since Linux 3.10; Linux-specific)
>               A nonsettable system-wide clock derived from wall-clock
>               time but ignoring leap seconds.  This clock does not
>               experience discontinuities and backwards jumps caused by
>               NTP inserting leap seconds as CLOCK_REALTIME does.
Considering how long it's been in the kernel, I consider that for most
Linux systems, it can be used. I reason similarly about the NTP
nanokernel interface that's been there for considerable time. The
problem with the nanokernel interface was that glibc was not updated
even if the kernel was that, which only goes to show that kernel
features should not be exposed that way. Regardless, that is solved now.
> It was recently added to the Linux Man Pages.  The new text is in Fedora 34, 
> not in Fedora 33, not in Debian 10/buster.
Yes. Also illustrates the problem again.
> It's not in NetBSD or FreeBSD.
Unfortunately not. However, that could probably be changed if enough
interest exists.
> A quick search for >CLOCK_TAI Windows< didn't find anything indicating it was 
> implemented.
>
Again, if enough interest exists, that could probably be fixed eventually.

Cheers,
Magnus