[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLVEVoZTbYi3LbjK@feng-clx>
Date: Mon, 17 Jul 2023 21:38:30 +0800
From: Feng Tang <feng.tang@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>,
David Woodhouse <dwmw@...zon.co.uk>,
"Paul E . McKenney" <paulmck@...nel.org>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>, <rui.zhang@...el.com>,
<tim.c.chen@...el.com>
Subject: Re: [Patch v2 2/2] x86/tsc: use logical_packages as a better
estimation of socket numbers
On Thu, Jun 29, 2023 at 09:27:10PM +0800, Feng Tang wrote:
> On Tue, Jun 27, 2023 at 01:14:34PM +0200, Thomas Gleixner wrote:
> > 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.
>
> I tested the patch on a 2S Icelake with Sub-NUMA-Cluster enabled, which
> shows 4 NUMA nodes, and this patch gave the right package number: 2
>
> On a hybrid system Alderlake with 8 P-core and 8 E-core,
> '__max_logical_packages' is 1.
>
> I also tried 'acpi=off' parameter. On a 2S Cascade Lake box, it only
> brought up one CPU due to no MP table, while on another single socket
> 18C/36T Cascade Lake box which has MP table, it brought up 18 CPUs.
> The '__max_logical_packages' is 1 for both of them.
>
> The patch covers most of cases we have listed, so feel free to add:
>
> Tested-by: Feng Tang <feng.tang@...el.com>
Hi Thomas,
I plan to put these together and resend. Can I use your Signed-off-by
for your code?
Thanks,
Feng
Powered by blists - more mailing lists