Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp751872rwe; Wed, 24 Aug 2022 08:26:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR5y2z8Zm4MG21dK8tS7MTq4kISKBV/uzPL2IUYuKLW1OrFDXztFEaoTZusYzxnjEyzX0nSq X-Received: by 2002:a17:907:6e93:b0:73d:8783:c306 with SMTP id sh19-20020a1709076e9300b0073d8783c306mr3364898ejc.387.1661354793485; Wed, 24 Aug 2022 08:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661354793; cv=none; d=google.com; s=arc-20160816; b=GMZ6FXGb3vRU3bN8RxaTouojidgpOY0R9AXGwefUr0joQx6rKHTafxaz+5H+e3gIHI 4dbkAreviLSZizLeQEkrTUshfqJFtZxm1OzWNnUadwRRIICimfmYzn5dzU5x+KSghFdg clEQ3fVVJCXnYS52wvGRE/iVdkiHg+nNxhskwbEul4aun4B0ZxLt2QHxiR/qdWAUW+d9 kQQBn46n1c3CuIHIAX8+Nl9GZfkwwdNWaDEnXtq/1p2V/lcqSaxyRI3idlBdbxzAyraQ +3I1bMlOePw4RvOPMswTnO50QhpqblFU5Zw1mTnRY9460Lf1jJpgTn5U3ePnGrZiM0qb Tmyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=onXIwT24w+dLpoyvwrvcKE6DSSsspuurq0qMZ2iYDwY=; b=d7NLfzXm1+xuci8yEZYtlMUK+Edske8Hx9NubRD+iazRLHVmD4DL9oJWhENX+PF2vd q4lqpz+O3bifYL35+1504CyhfGBgQo+/00SuVAqZETChEzNzIBE21e+WMCpIN3mqKYE3 jg9BBkk9Tfy6FRkB5zbNOZiZcb3E7/xkNGU4ASmxKpgE05tPh9KgtT448mzSDAKXC+RA CK3eTha5N5YUV+tUYQ3PUAtvOmKspwvurXB4ogc3QuciZjyo1ZmuSXzF1QLK4WEWeO7P CS7k3r8M6Q26Cey1nFyNpf7TZq07HhR3Vg27md0m7wyKKOrJWB2Q0mxLen9KHnTLWam7 H14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cTRYzAt8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2y0YtCwM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h4-20020a170906828400b0073136f89f8fsi1867172ejx.148.2022.08.24.08.26.06; Wed, 24 Aug 2022 08:26:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cTRYzAt8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2y0YtCwM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239084AbiHXOO5 (ORCPT + 99 others); Wed, 24 Aug 2022 10:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238085AbiHXOOw (ORCPT ); Wed, 24 Aug 2022 10:14:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87E721E3CF; Wed, 24 Aug 2022 07:14:51 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1661350490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=onXIwT24w+dLpoyvwrvcKE6DSSsspuurq0qMZ2iYDwY=; b=cTRYzAt8znJF2n9iO0G8ZEu0aYpUIjGo+LCgXHjxysTFXOJS2KmU+zk14SY+m/G20D/DBu RPLJDq42KDHJ8ogy/188aR3zXsf1ShC7PyzdZS+fXTOg0N+Xbj6wOltPG7RRXo31EB1V7q NktSpioTmaoxgTMVR7ndEKDLxJ+2kmW40j0KnK2b419XddeODlLUHnBa5E0z7ql5YOHxOs pprEk8zla0akCJiIoQB3S6GBjlp/Pg4fJpaqJYf9B4+PwXHB2H+2SwC2xVF/lBUZVFWpSO V+6Kgu5cFUdYRugLqg8THY3GzdM8sudmSi5awyCRp4QWyhdz5VpM448j+MBy+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1661350490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=onXIwT24w+dLpoyvwrvcKE6DSSsspuurq0qMZ2iYDwY=; b=2y0YtCwMntDOgtmIXCgpJTb0905ezzalkjcK9SrizmhPglbgVycztLCfWGdFXLGUABaXsP 26lfYJJYFQqXxuCQ== To: Muhammad Usama Anjum , Jonathan Corbet , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:DOCUMENTATION" , open list Cc: Steven Noonan , usama.anjum@collabora.com, kernel@collabora.com Subject: Re: [PATCH 3/3] x86/tsc: don't check for random warps if using direct sync In-Reply-To: <20220808113954.345579-3-usama.anjum@collabora.com> References: <20220808113954.345579-1-usama.anjum@collabora.com> <20220808113954.345579-3-usama.anjum@collabora.com> Date: Wed, 24 Aug 2022 16:14:49 +0200 Message-ID: <87sfllybhi.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 08 2022 at 16:39, Muhammad Usama Anjum wrote: > There's some overhead in writing and reading MSR_IA32_TSC. We try to > account for it. But sometimes overhead gets under or over estimated. > When we retry syncing, it sees the clock "go backwards". Hence, > ignore random wrap if using direct sync. This is just wrong. If the sync test can observe clock going backwards then it can be observed during runtime too. Preventing that is the whole point of the TSC sync exercise. Thanks, tglx