Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18064423rwd; Tue, 27 Jun 2023 11:04:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7k2cOPSrFqNdAL/W6VM2SwHKdCoYLiU7L1qzuI6xajBSjRGy/zmVNNYk7WTo6hs/DNW6zW X-Received: by 2002:a17:907:a06f:b0:98f:5640:16a with SMTP id ia15-20020a170907a06f00b0098f5640016amr5593780ejc.53.1687889088440; Tue, 27 Jun 2023 11:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687889088; cv=none; d=google.com; s=arc-20160816; b=lWCSsWREtxiUG9F0xfyavP/KuTxEaO6rW0avm4pxVUMcTRSe44f9lIMgI73ZcWQrtC A1iAeupaCFDnP8H8EMui+9UdDy0rr22wA/CiEG5sCm8MFN4tGRqmCQq2Wup+wo7Bz+ZG xPw7lWOvnSh1vMDs/517dsZ2OtheFh/xmZmZi7i/5KTMbh6abxR1QFbWjN5DsVMc5KTR 6RDHncKwHvPoiy07px6k6YXNABRgWLLwyHiH4lRrsJFqj41Tf5h814XGXrx02SendGpk SqyGBSGvAcdjh/dc2DBwJMNSrCMO4D9mnKMsExu3uG/ewktk5waQcsBxOBw3JPEsqRtK Io+g== 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=npF85FRxKY2gXCkKDnvL4/qKiC7YOuDmznNqzXS/8KY=; fh=qj8V7apZhxwiqu8BXAOaq5czlI882xfQeo4I7Byo7zg=; b=woOyQkUYOZFufTcJRfhXh2U7VbTszinCKyAwJblQnqc9U5aF2qjisJ0lhpz5/fvgRd VcS/K9ReCrd8c1DAkjBx11CxrZKc+3pTvt9ISvDk/JRBO1MN3s3cGDRh2viMQp6HtH6e 2mjR/MAF3a2KtJ5/fY/XsVC1ERCRZSU6Y+K/FmIhe2YEep4pjaosIBVlx8LmYgVWIsBx 6r4nnIaYi4DHau3KhlhLs2SQyisI72y0ckkZcbonEAO9QbmareJuM3D2hBY8viX/QaTC SAZZOMhyMxZjA0HpiMDoTaM2ytFvUCv3B1OsyTVqj7CcFl4V1RIboRcbLrsOB8zboc50 BtWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=u+cLz1qF; dkim=neutral (no key) header.i=@linutronix.de; 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 gr6-20020a170906e2c600b0098886d50308si4251039ejb.490.2023.06.27.11.04.23; Tue, 27 Jun 2023 11:04:48 -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=u+cLz1qF; dkim=neutral (no key) header.i=@linutronix.de; 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 S231339AbjF0Rzl (ORCPT + 99 others); Tue, 27 Jun 2023 13:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjF0Rzj (ORCPT ); Tue, 27 Jun 2023 13:55:39 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 167721BD1 for ; Tue, 27 Jun 2023 10:55:36 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687888534; 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=npF85FRxKY2gXCkKDnvL4/qKiC7YOuDmznNqzXS/8KY=; b=u+cLz1qF4NiJjuh3fRrrfmsjVJ5KAZfhIlqgkGQYtU4yihpoplZXMoIDI0kNe1z3xXtn/I AIeyL9wDz6ArsH1K+Tx/2eUkAYzihpl/1UwpKgvJ6yHRQ608gOhhCq92hF8582hrOtJS+r +7JkTv98Or9UihjXGhmYewP6c3cf8zi3pBNMdETaFc4IV2pD31eCXYe7eOJejGZSdM4Yg6 0k7vC+wYv3y46flKRHKeBpz+mA/Bi4KnkxujBu0XSHXSKEek1B9XTj+vgvjAJ4KekImKil wkOAXb8VHcvrDf/4+wgq5HciNxTGO5gW2J6jpWKipytIjEiLH2Lkk2Z9ye29PA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687888534; 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=npF85FRxKY2gXCkKDnvL4/qKiC7YOuDmznNqzXS/8KY=; b=cTjf63vv8QIMEM4W7/74fDFGhPaoe8bfX43ehcOf6IkCJZ1Sl5y5peAG9PA5RvHJ4J/o5d RjI8ncpK9CHo1XCw== To: Feng Tang Cc: Peter Zijlstra , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , David Woodhouse , "Paul E . McKenney" , x86@kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, tim.c.chen@intel.com Subject: Re: [Patch v2 2/2] x86/tsc: use logical_packages as a better estimation of socket numbers In-Reply-To: References: <20230613052523.1106821-1-feng.tang@intel.com> <20230613052523.1106821-2-feng.tang@intel.com> <20230615092021.GE1683497@hirez.programming.kicks-ass.net> <87h6qz7et0.ffs@tglx> <87edm36qqb.ffs@tglx> Date: Tue, 27 Jun 2023 13:14:34 +0200 Message-ID: <87r0px40o5.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, 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 Sun, Jun 25 2023 at 22:51, Feng Tang wrote: > From debug, the reason of the hung/stall is detect_extended_topology_early() > is called by cpu hotplug after boot, where there is "maxcpus=XXX" setting, > (#echo 1 > /sys/devices/system/cpu/cpuX/online). > > It could be fixed with below patch: > ---------------------------------------------------------------- > diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c > index 828c1f7edac1..1ff73c8c4972 100644 > --- a/arch/x86/kernel/cpu/topology.c > +++ b/arch/x86/kernel/cpu/topology.c > @@ -29,7 +29,7 @@ unsigned int __max_die_per_package __read_mostly = 1; > EXPORT_SYMBOL(__max_die_per_package); > > #ifdef CONFIG_SMP > -unsigned int apic_to_pkg_shift __ro_after_init; > +unsigned int apic_to_pkg_shift; Bah, yes. I missed the early_init() call from init_intel(). I hate that code with a passion.