lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160811130521.GA22741@krava>
Date:	Thu, 11 Aug 2016 15:05:21 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>, x86@...nel.org,
	Ingo Molnar <mingo@...nel.org>,
	Frank Ramsay <framsay@...hat.com>,
	Prarit Bhargava <prarit@...hat.com>
Subject: Re: [PATCH] x86/smp: Fix __max_logical_packages value setup

On Thu, Aug 11, 2016 at 02:48:39PM +0200, Peter Zijlstra wrote:
> On Wed, Aug 10, 2016 at 06:14:18PM +0200, Jiri Olsa wrote:
> > > Maybe one nit, the variable is no longer used for a max, so maybe rename
> > > it too?
> 
> > diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
> > index cf75871d2f81..c28010088651 100644
> > --- a/arch/x86/include/asm/topology.h
> > +++ b/arch/x86/include/asm/topology.h
> > @@ -118,8 +118,8 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
> >  #define topology_core_cpumask(cpu)		(per_cpu(cpu_core_map, cpu))
> >  #define topology_sibling_cpumask(cpu)		(per_cpu(cpu_sibling_map, cpu))
> >  
> > -extern unsigned int __max_logical_packages;
> > -#define topology_max_packages()			(__max_logical_packages)
> > +extern unsigned int logical_packages;
> > +#define topology_max_packages()			(logical_packages)
> >  
> >  extern int __max_smt_threads;
> >  
> 
> Aaahh, I missed this bit yesterday..
> 
> 
> Imagine a machine with physical hotplug, where we boot with half the
> sockets populated (say 2), then topology_max_packages() will return 2
> when we run the uncore driver init.
> 
> That driver will allocate resources based on 2.
> 
> Then we physically hotplug the remaining sockets (another 2), which will
> result in topology_max_packages() to now return 4.
> 
> When we run the cpuhotplug hook, it will try and access resources based
> on 4, which were not allocated.

hum, so we either need some acpi solution to get number of all
sockets or fix the uncore code to initialize pmu boxes on cpu
hotplug as well

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ