Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3688667pxy; Mon, 26 Apr 2021 07:35:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYkhR3etIoKdHkgAiW9IZgfy3QtKTXcDdG6eozZblScxBmw6MvsHNLGjumsZS+Wxjvgwcm X-Received: by 2002:a17:906:b754:: with SMTP id fx20mr19038132ejb.69.1619447710179; Mon, 26 Apr 2021 07:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619447710; cv=none; d=google.com; s=arc-20160816; b=S+ysfQ3k4UqoOrUR5sj7XObiOB6gXkLLxN/nJU9+RoptyIvQ0XmNMxUBkCq01CcFh/ C5Oc4Taea0GdiFyBkxghSo2cnTijHLSNVC570qPfezNNwJgDUQFuVztPdbdBhGoUAILG bHajstUsjvpwkNhldbvvoLq+b94AdDKuz2W1uOhFdNw1N1tkFZlH5Sn9+E9q/HL3MH8i mphDrpFmsG0ospE+qOvR2YLsdrLY9yT3HkORk6vpQQgujVmRleTPQ3DB4noovNNFFXUg CQxn5Y0GU1NBthtW5JviSGujxTBiVwJl8BiJU4SCMzy8n8DNn1Kk37YjumKgMzJNHv34 cFdg== 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=HBYyB3vvIvb1Q8KHDK6dR5Vt10a2wbXY0WlsmB3n/YQ=; b=ibJtSgOPnE58zZQWR98acjA4ecuq/G4GWxE02Jd6y3FtPNAQ8DrhAUbR3ff8am+Jyj 2ZzUUvEwWmL5wIUdWhnYMtERKxGX5xOr4ZbdFNx0N7nyGAFkOIxm8LH98xwBN9eIJdt1 RaW/uFTbJY96MahKxrdma7f+No3dvDS4dt/7nlAqHiWOH4jDhS6kYOsXNB/qUdwnxGLn wl6Yk1IYhtTkcqAUC31HUpzKDUZJ9XIWBQdKXHB8VgJO10sxa1S0rp7X9UUk15w7N93E xgRcGPdLAlyKzg/yoxeYOxI65FjZwXHdiZcUWvcwvWp5LlTcTdUwDZ4QP4CPu1GquMP+ hGjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=A5kWW7uU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="x/QCNcFD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si12990781ejy.703.2021.04.26.07.34.44; Mon, 26 Apr 2021 07:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=A5kWW7uU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="x/QCNcFD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233720AbhDZOeO (ORCPT + 99 others); Mon, 26 Apr 2021 10:34:14 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34514 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbhDZOeN (ORCPT ); Mon, 26 Apr 2021 10:34:13 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1619447611; 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=HBYyB3vvIvb1Q8KHDK6dR5Vt10a2wbXY0WlsmB3n/YQ=; b=A5kWW7uU8iILvPl+ZvribH58/QsJxJD++jtP40Z0tF5SvHLnNm4dum+kI/hl/eBgOjo8x5 Tv1EQnOqmPdAqr9neRQi7n79yepIWQ/EjLcfFFby+Ar0Qo8OlINB8G5DcBIfk1yZqRewbc 7w3MPEaiT3XJR9G3HKd6QXBj1C2lujYpt7XmC4nQfZWry70ZRdpVa804/yPhsotQYfKff+ 9TvhZkWFjka6lU+BrDaAeCd9hmNTbQF/SMjV9BEjrYKphyzNMcPktcOJ+83NncYTN2hzE9 E+QV63WhVyV4WmiUyKpwBLKU4L7yOfQZSQn7/Tnta/GuCpX1SQXUn8eiQ22pWg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1619447611; 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=HBYyB3vvIvb1Q8KHDK6dR5Vt10a2wbXY0WlsmB3n/YQ=; b=x/QCNcFD18eEKYa/a5m4++kPQHrMTLJBcKnYR5alcXAr5lzNjn3GJHClyWg2ovqyfNc2CP FbEVrsv9qn1/5zBQ== To: Feng Tang Cc: "Paul E. McKenney" , Xing Zhengjun , John Stultz , Stephen Boyd , Jonathan Corbet , Mark Rutland , Marc Zyngier , Andi Kleen , Chris Mason , LKML , "lkp\@lists.01.org" , lkp Subject: Re: [LKP] Re: [clocksource] 6c52b5f3cf: stress-ng.opcode.ops_per_sec -14.4% regression In-Reply-To: <20210426140512.GA23119@shbuild999.sh.intel.com> References: <04f4752e-6c5a-8439-fe75-6363d212c7b2@intel.com> <20210421134224.GR975577@paulmck-ThinkPad-P17-Gen-1> <20210422074126.GA85095@shbuild999.sh.intel.com> <20210422142454.GD975577@paulmck-ThinkPad-P17-Gen-1> <20210422165743.GA162649@paulmck-ThinkPad-P17-Gen-1> <20210423061115.GA62813@shbuild999.sh.intel.com> <20210423140254.GM975577@paulmck-ThinkPad-P17-Gen-1> <20210424122920.GB85095@shbuild999.sh.intel.com> <87pmyhte2q.ffs@nanos.tec.linutronix.de> <20210426140512.GA23119@shbuild999.sh.intel.com> Date: Mon, 26 Apr 2021 16:33:31 +0200 Message-ID: <87fszdt8sk.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 26 2021 at 22:05, Feng Tang wrote: > On Mon, Apr 26, 2021 at 08:39:25PM +0800, Thomas Gleixner wrote: >> On Sat, Apr 24 2021 at 20:29, Feng Tang wrote: >> > On Fri, Apr 23, 2021 at 07:02:54AM -0700, Paul E. McKenney wrote: >> > And I'm eager to know if there is any real case of an unreliable tsc >> > on the 'large numbers' of x86 system which complies with our cpu feature >> > check. And if there is, my 2/2 definitely should be dropped. >> >> Nothing prevents BIOS tinkerers from trying to be 'smart'. My most >> recent encounter (3 month ago) was on a laptop where TSC drifted off on >> CPU0 very slowly, but was caught due to the TSC_ADJUST check in idle. > > Thanks for sharing the info! So this laptop can still work with the > tsc_adjust check and restore, without triggering the 'unstable' alarm. > > Why are those BIOSes playing the trick? Maybe some other OS has hard limit > for SMI's maxim handling time, so they try to hide the time? Years ago someone admitted that it was the attempt to hide the (substantial) time wasted in SMIs from being detectable via tracing, but obviously that backfired because TSC got out of sync. Since then this has mostly vanished but for some reasons it's coming back every now and then. Rarely, but it happens still. >> I'm still thinking about a solution to avoid that extra timer and the >> watchdog for these systems, but haven't found anything which I don't >> hate with a passion yet. > > I see. So should I hold my two patches (tsc_adjust timer and tsc watchdog > check lifting) for a while? I have them on my list anyway, but yes we want to avoid the timer because that's what the HPC / NOHZ full people are going to complain about anyway. Thanks, tglx