Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2151159rwi; Thu, 20 Oct 2022 23:48:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5P7SWJgnQ4fEt7H6d05S9ZDDlnUvwmt+Y/7E23wvGVhdYHYgFmxLiNd/ogAItrqKYACAcW X-Received: by 2002:a05:6402:50cc:b0:45c:ec07:c394 with SMTP id h12-20020a05640250cc00b0045cec07c394mr15949860edb.411.1666334934176; Thu, 20 Oct 2022 23:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666334934; cv=none; d=google.com; s=arc-20160816; b=o8JtAKsV5mBWf5xEbRNSy+x1C5qljzv/tBWzYgyCu4Lh3umxmD1cmC8s4T33OpqAVf F/uYSwyC9PAZVG51S/TYhSpj2KEfCOENPwfrwlDJnN5mfRt/bEBEOkWU74iMEcTlcNgv tjLQaIxKrQlnrJYFVcxxYD15rZGyA3OCdD8p17HB2z/ZO3OjWXTwg8GLGbl2N+kG9C4y EkcnVco0t41GSN3PkAfEfS13DJoa/TSWYHKXsJtX37Nagx1XOYR8rhXvq/JC2x5AwPZt 62ds54JmTmloytZUpnNLP5aR6jk1fkqys2pbguOqw7QgFk9XaAv4stUmJ6qJ710dOnad HKmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N2qR5ZH6fBABl2WcUiv/7d02SDv+bhAxybM+ZhReIag=; b=aiLMXC38Ry4gjfxX0JpF3sJp8ZmtVlW1rYLkq4qwNm2l5MIVKLbpYXfnY4ra872rdO p24WTVClQMoJYBPSFMTBsLhJVj6Q/ffvP6a9SW7JxoQ9h/z7mlGgv6Lp9SHeDgvEUNc3 FrkFT07pejk3yrgqzz+JvNzkms9juBYGjvZYz6yfAHh2DlOHtQmy0miafUemxyht3AOQ cccaFbLrj5RrSOR+ZtA4CUqSkok1pWbzQn1nuWe67JiyQx7+Na2AkiJi8XF5eRbGykXV 6wwJVcu+0cnBVvT2y4S4HHvTHNVn8fk+pfellLS2/IpyuGFWLu2GHu9tRkwFcmYwDwUa m6HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cqRyEv+y; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id en6-20020a056402528600b004534c6c4bd7si16348342edb.433.2022.10.20.23.48.29; Thu, 20 Oct 2022 23:48:54 -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=@intel.com header.s=Intel header.b=cqRyEv+y; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229615AbiJUGVn (ORCPT + 99 others); Fri, 21 Oct 2022 02:21:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiJUGVk (ORCPT ); Fri, 21 Oct 2022 02:21:40 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5451F228CCC for ; Thu, 20 Oct 2022 23:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666333299; x=1697869299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j97xvK9t++xli12verMTAsYTdoFDdE9oHAeuOe31Zps=; b=cqRyEv+yuOYL6IJQPIXC/OMjAUgmcQucvyA1K0v7ls/tIEFftq9N2+L8 FpTGjk3FEpQp1w3TRI6M954iOiPbbPZ/LxyVD6QSIN8nQDuzxIQcN3IlJ SO30puLbznZFyUqwQ/ZxiK64GRSje74xkhxpuhSC51nMEBT2hflCHgTIx YoY17OQP4Oy0IHk18IKMC+eWOnbqt7z1NE3pIF5XReyw7izeFuRbuNyai JVjfjrLjaiX4SVeOFSfI5Da5id5tbsEmlvuTMEFvl1K3K6Jxq2YbaYrNg kkX04gNljCjrhlIBXbwnirgSXW0f3tON+OmGyRxUji42VX1IeWbaSPgFp w==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="287324653" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="287324653" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 23:21:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="755625363" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="755625363" Received: from feng-clx.sh.intel.com ([10.238.200.228]) by orsmga004.jf.intel.com with ESMTP; 20 Oct 2022 23:21:36 -0700 From: Feng Tang To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org Cc: rui.zhang@intel.com, tim.c.chen@intel.com, Xiongfeng Wang , liaoyu15@huawei.com, Feng Tang Subject: [PATCH v1 2/2] x86/tsc: Extend watchdog check exemption to 4-Sockets platform Date: Fri, 21 Oct 2022 14:21:31 +0800 Message-Id: <20221021062131.1826810-2-feng.tang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221021062131.1826810-1-feng.tang@intel.com> References: <20221021062131.1826810-1-feng.tang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 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 --- 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