Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4909134imm; Tue, 18 Sep 2018 00:53:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbMWDkGx36ZeOl0+fWMwc1hj0qlW1i0mjgpvnEDwk79TGRS/n3KdCluaH/MGKxnf5HF7tnU X-Received: by 2002:a62:8704:: with SMTP id i4-v6mr29345344pfe.62.1537257198895; Tue, 18 Sep 2018 00:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537257198; cv=none; d=google.com; s=arc-20160816; b=s1HPRcEn4MP2ZCZuO0QPA5umEtMS2IkHPh8sWc7hktRqLJeGshWPQcsy9aGOq7Wp8i YqB5gwKdl6XcZZ/0ytbR8nBtg5Gs2VxCfSa+QNTAzEVMJJs1H/jOs/D9Wm5fnDYdqi1p fvdwAasAcL5J+dPe+bHp2ZLIzu9vYyETaWghWgWjgbSqwiYEkMpTnfpEyC41dFAbmOoE qBF3Y9DxhzpRyBG5B6+dkD2OQZ5APlO6INFgjlXnzPe9FfvVrDQZXEWJUvOC7WyFIJ9J kYcifRCkOkrw0teBg4zJNAJAVCRSM3SaquhH4VQIPZ4GFD7cPGJyHHJD6knwL/XpTkGS 8Qzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=O78VEOZe1YtPCRKyVBZpFNJFXEf16c5j+EG8QNTLsL0=; b=QsvVyPqQiNzUYa4e3Q8cx8OkzYoWFdO1SyVQNCpra7dK93Z7iOsYIMHdq1kXPoQ9Nc apSrtrj3CPp5auRAr+Qo5wjCVxgbpp/+F5XH9YejNXN7QQwrecCtYT36m6GXWjMpqpOI nvSRYIfQpjeis37ovBWEQekKebDyLF3MFo+neh/uZih7SJ94WimT4xq6zTy5zrNOBAjw 9MT7khjHQGSGQST9L5j3ykuz3afOHLu8t1aw2TsxD+qcE0u2N5li6OAyDL3F9kMJiMJQ plA0d3mdDMztpUhInQ6hzr3xskKw/0inEh4N65AaILC7ZE80n/CxubIeHmvh40liEfX9 3UMg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33-v6si16546939pgm.379.2018.09.18.00.53.01; Tue, 18 Sep 2018 00:53:18 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729089AbeIRNYB (ORCPT + 99 others); Tue, 18 Sep 2018 09:24:01 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:57014 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728605AbeIRNYB (ORCPT ); Tue, 18 Sep 2018 09:24:01 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g2AoB-0004GC-Gg; Tue, 18 Sep 2018 09:52:31 +0200 Date: Tue, 18 Sep 2018 09:52:26 +0200 (CEST) From: Thomas Gleixner To: John Stultz cc: Andy Lutomirski , LKML , X86 ML , Peter Zijlstra , Matt Rickard , Stephen Boyd , Florian Weimer , "K. Y. Srinivasan" , Vitaly Kuznetsov , devel@linuxdriverproject.org, Linux Virtualization , Paolo Bonzini , Arnd Bergmann , Juergen Gross Subject: Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case In-Reply-To: Message-ID: References: <20180914125006.349747096@linutronix.de> <20180914125118.909646643@linutronix.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Sep 2018, John Stultz wrote: > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > Also, I'm not entirely convinced that this "last" thing is needed at > > all. John, what's the scenario under which we need it? > > So my memory is probably a bit foggy, but I recall that as we > accelerated gettimeofday, we found that even on systems that claimed > to have synced TSCs, they were actually just slightly out of sync. > Enough that right after cycles_last had been updated, a read on > another cpu could come in just behind cycles_last, resulting in a > negative interval causing lots of havoc. > > So the sanity check is needed to avoid that case. Your memory serves you right. That's indeed observable on CPUs which lack TSC_ADJUST. @Andy: Welcome to the wonderful world of TSC. Thanks, tglx