From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9319C433FE for ; Thu, 3 Dec 2020 16:08:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A662207A9 for ; Thu, 3 Dec 2020 16:08:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgLCQIi (ORCPT ); Thu, 3 Dec 2020 11:08:38 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34869 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727656AbgLCQIi (ORCPT ); Thu, 3 Dec 2020 11:08:38 -0500 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id E9C226000A; Thu, 3 Dec 2020 16:07:53 +0000 (UTC) Date: Thu, 3 Dec 2020 17:07:53 +0100 From: Alexandre Belloni To: Jason Gunthorpe Cc: Thomas Gleixner , Miroslav Lichvar , linux-kernel@vger.kernel.org, John Stultz , Prarit Bhargava , Alessandro Zummo , linux-rtc@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH] rtc: adapt allowed RTC update error Message-ID: <20201203160753.GB7535@piout.net> References: <20201201171420.GN1900232@localhost> <20201201173540.GH5487@ziepe.ca> <87mtywe2zu.fsf@nanos.tec.linutronix.de> <20201202162723.GJ5487@ziepe.ca> <87a6uwdnfn.fsf@nanos.tec.linutronix.de> <20201202205418.GN5487@ziepe.ca> <874kl3eu8p.fsf@nanos.tec.linutronix.de> <87zh2vd72z.fsf@nanos.tec.linutronix.de> <20201203021047.GG3544@piout.net> <20201203155249.GT5487@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203155249.GT5487@ziepe.ca> Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org On 03/12/2020 11:52:49-0400, Jason Gunthorpe wrote: > On Thu, Dec 03, 2020 at 03:10:47AM +0100, Alexandre Belloni wrote: > > > IIRC, used in conjunction with rtc_hctosys which also adds > > inconditionnaly 500ms this can ends up with the system time > > being one second away from the wall clock time which NTP will take quite > > some time to remove. > > I can't remember the details, but this was not the intention. > > As long as systohc and hctosys exist then the design goal of rtclib > should be to provide sub-second accuracy on the round trip of time > through the RTC. > > Otherwise what is the point? > hctosys never had a sub second accuracy because there is no way to accurately read the rtc time without being ready to wait up to a second. I have patches doing exactly that but I'm pretty sure nobody wants to pay the price and have a kernel that boots significantly slower. Especially since that would basically affect everyone since systemd requires that hctosys is enabled. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com