Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1884900imm; Thu, 24 May 2018 02:18:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrnJLFVJADzKSdIYJ8GZbPaYc7A7UiEIBwlp/hu3p1zZi7tuKLdTfdekSY2q6PTXrDIA/yf X-Received: by 2002:a17:902:8c81:: with SMTP id t1-v6mr6410154plo.310.1527153500946; Thu, 24 May 2018 02:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527153500; cv=none; d=google.com; s=arc-20160816; b=Ji4k9UIExAQ3M7IF4EPLmai8cDQAC2v4C/XgT75uvztu6nOjJUint+ilwIk2B6FwLW VNw/jn0np+B1Ap7CSm8un49KI1GOQqfizs1Exf/nqn7arIJkgj5QrjASrNbM30ESB7T9 X5j4bRRL99dr4TBHz0VQ5SzUvYOy+MNg8763THP19vDmSzWjmb2gcanLtm042Srq2hpX OzJIM5wFyk36JIxTR7y2dTpyn5h6jc1dvfIY8Lmk97rPpXAe9OU9Cepi44vH8K+e7c4U Ioou5Vq8CyH5iLgcCx0fzmIRnpUGh9A7Cryg9CrVmfmmGr/zBKaACpWSyrsXbZG2lSle lPYw== 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:arc-authentication-results; bh=VHYuFFBHWVEt+H6fQYIVQYKT+KTEr6N/dvfH6ygG4+g=; b=GMxoJ1oMomJ69LCDcc2XOLtb92NBp1SeQNGguhgdYcSUJUNuWMAOGc9Mxd/BEP0EHZ BZCK896tUahNzUMPUBSYJ8p5VWKS4uBd+I0oN8ECsERZJGs0OtUQWPrV5LVUS2pYyLeR yHVcUNM2rjog9PYWUA/535p5nhCjJc/senqWGg1Rmj5TLucjIQQmFX0SJtKna6dp8h0E pbtnNf9OgWlfbW6Qgk/Ktp+4/I4Xr6qUub6olQOYxuJs1bY749yYR00uI48Y6rf+xZE7 ycN/qh0X/Z10Zrh7k40z4Kffsf8VL9ewxCiRRonO7gTmiGKfAt/cODjVuwF7AE7KRXOM O6zA== 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 i64-v6si1122646pgc.673.2018.05.24.02.18.06; Thu, 24 May 2018 02:18:20 -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 S965893AbeEXJQd (ORCPT + 99 others); Thu, 24 May 2018 05:16:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57980 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965833AbeEXJQ1 (ORCPT ); Thu, 24 May 2018 05:16:27 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 58AB6C12A7; Thu, 24 May 2018 09:16:27 +0000 (UTC) Received: from localhost (unknown [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77CBE2026DEF; Thu, 24 May 2018 09:16:26 +0000 (UTC) Date: Thu, 24 May 2018 11:16:19 +0200 From: Miroslav Lichvar To: John Stultz Cc: lkml , Thomas Gleixner , Richard Cochran , Prarit Bhargava Subject: Re: [PATCH RFC] timekeeping: Update multiplier when NTP frequency is set directly Message-ID: <20180524091619.GC1177@localhost> References: <20180523113321.20404-1-mlichvar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 24 May 2018 09:16:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 24 May 2018 09:16:27 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mlichvar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 11:05:34AM -0700, John Stultz wrote: > On Wed, May 23, 2018 at 4:33 AM, Miroslav Lichvar wrote: > > This removes a hidden non-deterministic delay in setting of the > > frequency and allows an extremely tight control of the system clock > > with update rates close to or even exceeding the kernel HZ. > I feel like we tried this years back, but had to revert it. But its > been awhile. Am I confusing things? IIRC we only talked about doing this. Before the recent changes in timekeeping, namely c2cda2a5 (Don't align NTP frequency adjustments to ticks), it wouldn't make much sense. There would still be a hidden delay, it would just be negative (from the applications point of view). > > - /* Check if there's really nothing to do */ > > - if (offset < real_tk->cycle_interval) > > - goto out; > > - > > Apologies again, as I don't have a lot of context here these days, but > this could mean we end up doing unnecessary work on every > update_wall_time, no? I'm not sure. If I understand it correctly, update_wall_time() is normally not called more than once per tick. Only when an update is late and it happens to include the next tick, the subsequent call might be unnecessary, right? > Would a "force" flag be better to pass to update_wall_time() to only > avoid the short-cut in the non-adjtimex case? Yes, that makes sense. Thanks, -- Miroslav Lichvar