Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp601561pxu; Thu, 3 Dec 2020 08:11:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrg1VoBPujC3Pj5LY9MX0Ypsn8d6tRKCBe2lPY46Ytb4fCTqNqE2NA6uwspEfMvfntlCh7 X-Received: by 2002:a50:f61b:: with SMTP id c27mr3455227edn.61.1607011895459; Thu, 03 Dec 2020 08:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607011895; cv=none; d=google.com; s=arc-20160816; b=LfWuu7FlMQRg268lsHYy8XigUlPEy0ojiMxCHNLfEspU+FLFQioJlWA9hcKi/KxkmB Jh6qnEUI3fPWfz/vCqzQKJaISxi1os9lW3twQqzp/ixCfXM6eWiZvuf8pNNWRJol7ukj lFIMmvJOJL8MjOffFrJNdropyKz3hvfVeIyDvH6bSMFhWhoDQBDtwTS5eAQO1qdjCCus wKHxl4aCIK8i8GJIRCTUUIU34uhVGry1pNbRTr+wPSz2PlXfLcMNnHsehk9gyPhidHpO AFo7U9OZTRbIDbS2ZZJVVb0ymriV/LBaF4xKSS3KhbYnEJnnqLDkiO8rzhuBTFxHLZxr gCow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TUmGq93rxGVqog8p99nclWbT+I1ronCg40izl6sSmDY=; b=fNhGdXj+H/cTjhZj74sEShgOnkIgXMg6bX6C/zxrnyr4lRbXM7QSOJBKRhcaGOadLE DG0noH0eGzqWVAqcFaYGiXqqoPn9fsJUti6ZmE4Rgt+pkK58eYPcCpmQj4T9FRZUQVDd 0JxUuN6N/jOZ3/h6N5EW932rT4a1AZWZSyY1Li5NvegHcBpnwuDhHtJo4TDbBVKuXsDY wGhuVpTEoQG4MwQibx+rXrFxzuNiB3VPVs0hmyTuOzqA4C1wKBmQHy5Qn3pr6kh8e+Ah 5Qi13Z2Ov6z8P/VoIQkGRQfw8vz+bKQ7xBrBfnTkkuLndVHFbYbQaKHd9voLJs71OE9l 0x2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si1250542eji.697.2020.12.03.08.11.11; Thu, 03 Dec 2020 08:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731173AbgLCQIj (ORCPT + 99 others); Thu, 3 Dec 2020 11:08:39 -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-kernel@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