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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 287A6C18E57 for ; Thu, 3 Dec 2020 20:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4868221F2 for ; Thu, 3 Dec 2020 20:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731306AbgLCULU (ORCPT ); Thu, 3 Dec 2020 15:11:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726681AbgLCULT (ORCPT ); Thu, 3 Dec 2020 15:11:19 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72FC5C061A4E for ; Thu, 3 Dec 2020 12:10:33 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id p12so2324864qtp.7 for ; Thu, 03 Dec 2020 12:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=19F8C1TBzS2ilKbChch8R1U1D631baLIUMtRl/hLoag=; b=YzUXB+Qw8kAAw9JNsQTRIo32gyXsZXIOS/QZtyaqxnozITvvhspMd0cT9b2xKI/qU8 S0J7JjMOCvd3AAssKY6xJhBNRKgx1J8DgJTB2W466txaZSYRsDcOfxhYacDRLzixMYcT qDQwQlMLSJMa/H4KMb1d0G3RUqrB918TJzCwx8662oAtsti5TOaEMF8p8I5AcO4VoC18 HcP0A/ZGYQzCNV6urYLdzkn597LwNKZg47cZndou3aKR0qzVYoo9qIGWVKMWOoNk3PqL 1yM4eZqsO3XjrToh87Y2C1GIsmtvys5dIgLVZjzoE9AccMOCn2rs/uPZ0Cvw3nEIAcbn a+1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=19F8C1TBzS2ilKbChch8R1U1D631baLIUMtRl/hLoag=; b=TruCw5qWzjj/mKt68YkObBjTFQhPHuRkt/GpqOV48JmsB8LUJvuldJ70It1UNGvHPB n18JMGmrsRmPk5E8ei7+y/KIKZwpX6W2g6DJyN+Oh7p8HNUiov4gUDzt13V17zGZsCka dqeouPxhw1QOTWotjoRuSseVfba9e52SFtLR9fx6AR8p4jxmMR/QfvYFpAnqNVTPq6Mn 8BcKe3V3P6ZjV6mBXKGJUBfWCdHapE3pEf4RhBag7+wOkjwAoOZh2ZIb2YTEbXAJdOJh N6fEPPeEo4SsvuvwTG9jHRrQ1uBmmWds2Igsa4KXRHg7Vxoybp9pQzI7xbGWGDF6noap jxZA== X-Gm-Message-State: AOAM533s85JFX1p29hdgnU89aTsCMJUcBdRTpb9buSWdB07DHBJM5zX+ 6da8N3xZae0eVXspttMlzZJGDg== X-Google-Smtp-Source: ABdhPJxdW5jHNkHkOUUokYG75B90dE0vOuBurhCtqT9DeBoWb8oeEOYbtdiXtn9JjTrE4lWGGNPd4Q== X-Received: by 2002:ac8:678d:: with SMTP id b13mr5205754qtp.332.1607026232532; Thu, 03 Dec 2020 12:10:32 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id o21sm2817783qko.9.2020.12.03.12.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 12:10:31 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kkuvu-005bne-T7; Thu, 03 Dec 2020 16:10:30 -0400 Date: Thu, 3 Dec 2020 16:10:30 -0400 From: Jason Gunthorpe To: Alexandre Belloni 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: <20201203201030.GB1317829@ziepe.ca> References: <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> <20201203160753.GB7535@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203160753.GB7535@piout.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 05:07:53PM +0100, Alexandre Belloni wrote: > 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. Yes, I know. I was talking about a goal.. If that is not the goal then just delete it all and update the docs that userspace needs to deal with all of this and the kernel stuff isn't supposed to be useful. Jason