From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D856C433F5 for ; Tue, 11 Oct 2022 13:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbiJKNdk (ORCPT ); Tue, 11 Oct 2022 09:33:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbiJKNde (ORCPT ); Tue, 11 Oct 2022 09:33:34 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD7BE13D5C for ; Tue, 11 Oct 2022 06:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665495213; x=1697031213; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=/yu3qmwE7z5AN29MTBxAK8Vxbr09w0Sogy4HqWwAnwo=; b=myL05Rmj1SQrqUZX6gqNU4wK8nVs7pQP1u2S4isNGMVtu8RjUompvHXM 8nN1K6HVP0wIreT1jUzOHtyGRTJ/54uhdsS3z6Tj+EEdiz/iF7YUmZjl2 BiVPAkqBXQ6fdOxa+tEmdj/yRIVFPc1JPce2oIncnbzFv3l1Msx/OUxff mIa4biFH4H+QebZ5WyBxcfyLtOvBK9k+Bpm07Y2luPiDCnN8iNMwHH1BH FVBt3cKAJR8EbyitI0/Cuaq1BjDeJNZ604q2iUxtMwFs1sRDZAXhxn7DL +A/ijA/+qK3DEPSpP6laAWidLyuSM3oUKBJGAmL5g0fU7E1+4+rkQSQ6k A==; X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="305557097" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="305557097" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 06:33:33 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10497"; a="657351677" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="657351677" Received: from cdai2-mobl.ccr.corp.intel.com ([10.254.213.73]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 06:33:29 -0700 Message-ID: Subject: Re: [PATCH] x86/tsc: Extend the watchdog check exemption to 4S/8S machine From: Zhang Rui To: Peter Zijlstra , Dave Hansen Cc: Feng Tang , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@intel.com, Xiongfeng Wang , Yu Liao Date: Tue, 11 Oct 2022 21:33:26 +0800 In-Reply-To: References: <20221009051209.393377-1-feng.tang@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-10-11 at 09:52 +0200, Peter Zijlstra wrote: > On Mon, Oct 10, 2022 at 07:23:10AM -0700, Dave Hansen wrote: > > On 10/9/22 18:23, Feng Tang wrote: > > > > > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c > > > > > index cafacb2e58cc..b4ea79cb1d1a 100644 > > > > > --- a/arch/x86/kernel/tsc.c > > > > > +++ b/arch/x86/kernel/tsc.c > > > > > @@ -1217,7 +1217,7 @@ static void __init > > > > > check_system_tsc_reliable(void) > > > > > if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && > > > > > boot_cpu_has(X86_FEATURE_NONSTOP_TSC) && > > > > > boot_cpu_has(X86_FEATURE_TSC_ADJUST) && > > > > > - nr_online_nodes <= 2) > > > > > + nr_online_nodes <= 8) > > > > So you're saying all 8 socket systems since Broadwell (?) are > > > > TSC > > > > sync'ed ? > > > No, I didn't mean that. I haven't got chance to any 8 sockets > > > machine, and I got a report last month that on one 8S machine, > > > the TSC was judged 'unstable' by HPET as watchdog. > > > > That's not a great check. Think about numa=fake=4U, for > > instance. Or a > > single-socket system with persistent memory and high bandwidth > > memory. > > > > Basically 'nr_online_nodes' is a software construct. It's going to > > be > > really hard to infer anything from it about what the _hardware_ is. > > We have both c->phys_proc_id and c->logical_proc_id along with > logical_packages. > > I'm thinking you want something like max(c->phys_proc_id) <= 4. > Because > even if you only populate 4 sockets of an 8 socket server you're up a > creek without no paddles. > > But it all comes down to how much drugs the firmware teams have had > :/ > It is entirely possible to enumerate with phys_proc_id==42 on a 2 > socket > system. topology_max_packages() or variable logical_packages can tell the maximum packages. But this check_system_tsc_reliable() is done in early boot phase where we have boot cpu only. And the cpu topology is not built up at this stage. thanks, rui