Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2577280rwd; Fri, 2 Jun 2023 11:18:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jHwCBfnn89Maqd31FjD3flG1lVKnONB2TV46RfWDvYq4QSoYgDH7gyzuqOs+TP/44BTLn X-Received: by 2002:a17:902:e5c4:b0:1b0:3742:e732 with SMTP id u4-20020a170902e5c400b001b03742e732mr929662plf.23.1685729922255; Fri, 02 Jun 2023 11:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685729922; cv=none; d=google.com; s=arc-20160816; b=akOsmWBzepp1W28UGGDgCoBG0lO6q1JoTysa1gXkfGRAnbqTdNZ53OmR5P098AejIT UhL6/57qJuXHHWDmHSWtUECIG+Oz17A+IykXfOy5lPkEP9Skkv4Tu+nrw84rB9rE83kl BYJtNQOmauULLjuWIrfax5CpuBwAD8/iJpKzLWDq7zz91dIzymSdsb4BIQ8f7yge+0yg 7BPW44g9Jhv9kZIZ+BFGnJOpbEeOrcqtlhBpVYsCDmxftnj3Z/KsoDRGmLBO/dqL8Nb4 DJ+mrBkFvv8jUNw5YPyy0Dv5YHBGpbWNYqCMZ3MWBM4udqEtTCb0V2xRmyqNd5NRitHQ 9c5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZfcqMp2rBLD3YQITAu96dgWnf5P9I5XbViZ5YUmmsBo=; b=DxVAgANvk+bqvUaZSLWLLho/mF2M4qkMFNFztdvfStoKd067WIZWgSSsrkMy1svXta D9wnuUosLukoV7uALQYFRt49lNS7YPBRMS+0AH0kQtA9eEmc3Yl+dAiehDbK7nCuSuJW XJLxAeElw/B6Xgua7XD12vSdTcGjAri5Qm02dcG/j9GpTj4GacYgQCWwCRgv65BAxNPc aQ8EVrDhne+WaS+kRbCpGE718lUx5uZySHOsP4DjGBpGA1/pwXZuIKc0gheW82BCAwX3 gJXOXFPnc0EPB+bq7LZvch2mWyP2Bok8eOWcnhioYQq9UqPfiHVCsLlNOYgprR2oZGNJ 2eqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cJLFnmyW; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a17090301ce00b001adb600d5e9si1195518plh.640.2023.06.02.11.18.26; Fri, 02 Jun 2023 11:18:42 -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=@kernel.org header.s=k20201202 header.b=cJLFnmyW; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236979AbjFBSBA (ORCPT + 99 others); Fri, 2 Jun 2023 14:01:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236323AbjFBSA7 (ORCPT ); Fri, 2 Jun 2023 14:00:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB8131BF for ; Fri, 2 Jun 2023 11:00:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 611DF64C7D for ; Fri, 2 Jun 2023 18:00:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCF8CC433EF; Fri, 2 Jun 2023 18:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685728855; bh=cpg2kA4m9ecom4a4wqNDBo51WrTY4aWxfzQcoCpx8B8=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=cJLFnmyWPDpafmJQC8eEVQXtNqUKiBoo16PYhumNiCbdsMV4xqfgQo6Sd30hr7i9H QyrS8Lxe+/1ZXE1/VmSjFXHhNL6ClrkGDUGPbVkP3cMzTZIFB7T3t7qZpS+7TTcdxx 7ctXtVY7PCOajePIS1OrWboMcq0B+c5crMAFdQszjQslXfoeMFkYjfmj16lZo2dDgp 7rHJ8llwsCdZpW7q8sFGa6VZff1BnXhRv4pMMbbNrHmYh89pZ8zV75Fl1iH7UOGdfe Fed26dLi5Y51Ss0wI7s4etuLiE3zM7sY9cMhUnugnnUqOACd5crB9++IQSckhqA9b5 Al18l7+61qdkA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 530CBCE3B00; Fri, 2 Jun 2023 11:00:55 -0700 (PDT) Date: Fri, 2 Jun 2023 11:00:55 -0700 From: "Paul E. McKenney" To: Feng Tang Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, tim.c.chen@intel.com, Xiongfeng Wang , liaoyu15@huawei.com Subject: Re: [PATCH v1 2/2] x86/tsc: Extend watchdog check exemption to 4-Sockets platform Message-ID: <06df410c-2177-4671-832f-339cff05b1d9@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20221021062131.1826810-1-feng.tang@intel.com> <20221021062131.1826810-2-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021062131.1826810-2-feng.tang@intel.com> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Oct 21, 2022 at 02:21:31PM +0800, Feng Tang wrote: > There is report again that the tsc clocksource on a 4 sockets x86 > Skylake server was wrongly judged as 'unstable' by 'jiffies' watchdog, > and disabled [1]. > > Commit b50db7095fe0 ("x86/tsc: Disable clocksource watchdog for TSC > on qualified platorms") was introduce to deal with these false > alarms of tsc unstable issues, covering qualified platforms for 2 > sockets or smaller ones. > > Extend the exemption to 4 sockets to fix the issue. > > We also got similar reports on 8 sockets platform from internal test, > but as Peter pointed out, there was tsc sync issues for 8-sockets > platform, and it'd better be handled architecture by architecture, > instead of directly changing the threshold to 8 here. > > Rui also proposed another way to disable 'jiffies' as clocksource > watchdog [2], which can also solve this specific problem in an > architecture independent way, with one limitation that there are > also some tsc false alarms which were reported by other hardware > watchdogs like HPET/PMTIMER, while 'jiffies' watchdog is mostly > used in kernel boot phase. > > [1]. https://lore.kernel.org/all/9d3bf570-3108-0336-9c52-9bee15767d29@huawei.com/ > [2]. https://lore.kernel.org/all/bd5b97f89ab2887543fc262348d1c7cafcaae536.camel@intel.com/ > > Reported-by: Yu Liao > Signed-off-by: Feng Tang We have a number of four-socket systems whose TSCs seem to be reliable. We do see issues where high memory load forces the TSC to be marked unstable, but that is because those systems are using an older kernel. If the TSCs do start to misbehave, I will of course let you all know. But in the meantime: Reviewed-by: Paul E. McKenney The previous patch that changes the definition of "socket" I have no opinion on. I must let you guys work that out. However, I do note that this patch can be rebased so as to no longer depend on that patch. Thanx, Paul > --- > arch/x86/kernel/tsc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c > index 178448ef00c7..356f06287034 100644 > --- a/arch/x86/kernel/tsc.c > +++ b/arch/x86/kernel/tsc.c > @@ -1400,7 +1400,7 @@ static int __init init_tsc_clocksource(void) > if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && > boot_cpu_has(X86_FEATURE_NONSTOP_TSC) && > boot_cpu_has(X86_FEATURE_TSC_ADJUST) && > - logical_packages <= 2) > + logical_packages <= 4) > clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY; > > /* > -- > 2.34.1 >