Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2560739ybl; Mon, 19 Aug 2019 04:10:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+9I14XSzokv/hDSAX+wm1ziqXDQwzdkjn68idrpuYl5HXlo1Wi+uHHAmqYAuv6ViWib3j X-Received: by 2002:a17:90a:b115:: with SMTP id z21mr20144791pjq.79.1566213017969; Mon, 19 Aug 2019 04:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566213017; cv=none; d=google.com; s=arc-20160816; b=i5U0JdNhr4V05b18JFWuvp77cTOJIUQjBqDSm6oM84752ngUQEOmIhyDN1PvKzT1v8 WWYAG+RQv4X1Tudx19rqpkueeriIg/aUFafbzJDoNdK60Pg3d5ayNAfoY+IIx3JKO1sp v8Vli19CbPGNfWZCvreAH8d/iYhol1YAMLsyGoda43vPAO5a/UItaVb8/RoBxoIq+/tB dy0yv4OcGvx42NPj7IOoy179I2Kghr5LB/jOtTMjq+puEQesIKRfvIan+K1cOJ1qjk8N 2D4VLPaghVcwPA3Ryv1GgYL8eNM3omV1hvFXExiUDtDc2Kn3taCqHBlSsM1P4l7cQ/jT p9jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=n0wFUeON5rBAFjHU5Qg9roDfb6H74QaQEv5RaXspJqE=; b=v4hmJfHyZTw5R+qH6Jfm4zR+l2pSBf1jSh1y0JfFF1JPjEjD7oDz3d0Yyj0GKI83h/ T9+8u8962cWvWkHxN28VsfCNzuW/fpce+lH3W6Rib8F4FxPyMtIcbSVWgOg9ETaNaShO WZW1rcQixUgT2JbGf5UyqjVcJmuoc4CURtKYrM+llr5AbDdfGCdNinEKjumH8gyFcsYX aLk6BKHQXk7p7Grj2zAkrCkXj70Kch7V2NZV3i39Mgav0y4belnNj98jbbQHk/Mx8FRQ 428qV+vfsAy2VOPDSDcWqK1Y/s+J7H/NrqeXcNknAxv/3wZjgTBNLUOKMQpNvKlqtGzW AFWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si9778551ple.240.2019.08.19.04.10.02; Mon, 19 Aug 2019 04:10:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbfHSLJK (ORCPT + 99 others); Mon, 19 Aug 2019 07:09:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfHSLJK (ORCPT ); Mon, 19 Aug 2019 07:09:10 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D91E3D96D; Mon, 19 Aug 2019 11:09:09 +0000 (UTC) Received: from ws.net.home (unknown [10.40.205.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB33227C41; Mon, 19 Aug 2019 11:09:05 +0000 (UTC) Date: Mon, 19 Aug 2019 13:09:03 +0200 From: Karel Zak To: Alexandre Belloni Cc: Lennart Poettering , Arnd Bergmann , "Theodore Y. Ts'o" , Linus Torvalds , Linux Kernel Mailing List , Thomas Gleixner , John Stultz , Stephen Boyd , Florian Weimer , "H. Peter Anvin" , Palmer Dabbelt , Alistair Francis , GNU C Library , OGAWA Hirofumi Subject: Re: New kernel interface for sys_tz and timewarp? Message-ID: <20190819110903.if3dzhvfnlqutn6s@ws.net.home> References: <20190814000622.GB20365@mit.edu> <20190814090936.GB10516@gardel-login> <20190814093208.GG3600@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814093208.GG3600@piout.net> User-Agent: NeoMutt/20180716-1584-710bcd X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 19 Aug 2019 11:09:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 11:32:08AM +0200, Alexandre Belloni wrote: > On 14/08/2019 11:09:36+0200, Lennart Poettering wrote: > > On Mi, 14.08.19 10:31, Arnd Bergmann (arnd@arndb.de) wrote: > > > > > - glibc stops passing the caller timezone argument to the kernel > > > - the distro kernel disables CONFIG_RTC_HCTOSYS, > > > CONFIG_RTC_SYSTOHC and CONFIG_GENERIC_CMOS_UPDATE > > > > What's the benefit of letting userspace do this? It sounds a lot more > > fragile to leave this syncing to userspace if the kernel can do this > > trivially on its own. Good point, why CONFIG_RTC_SYSTOHC has been added to the kernel? If I good remember than it's because synchronize userspace hwclock with rtc is pretty fragile and frustrating. We have improved this hwclock code many times and it will never be perfect. See for example hwclock --delay= option, sometimes hwclock has no clue about RTC behaviour. > It does it trivially and badly: > > - hctosys will always think the RTC is in UTC so if the RTC is in > local time, you will anyway have up to 12 hours difference until > userspace fixes that. Cannot we provide all necessary information for example on kernel command line, or/and as rtc module option? Karel -- Karel Zak http://karelzak.blogspot.com