Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-09 Thread Dario Faggioli
On Thu, 2015-07-09 at 09:58 +0800, Chao Peng wrote: > On Wed, Jul 08, 2015 at 05:32:11PM +0100, Jan Beulich wrote: > > >>> On 08.07.15 at 18:17, wrote: > > > I think it has to do with the fact that I've got CPU #0 on socket #1, > > > while Boris' (and perhaps Chao's too) test box have it on socket

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Chao Peng
On Wed, Jul 08, 2015 at 05:32:11PM +0100, Jan Beulich wrote: > >>> On 08.07.15 at 18:17, wrote: > > I think it has to do with the fact that I've got CPU #0 on socket #1, > > while Boris' (and perhaps Chao's too) test box have it on socket #0. > > Ah, yes, this is indeed a case I didn't consider w

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Chao Peng
On Wed, Jul 08, 2015 at 04:38:52PM +0100, Jan Beulich wrote: > >>> On 08.07.15 at 17:11, wrote: > > On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: > >> >>> On 08.07.15 at 11:36, wrote: > >> > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; > >> > static void smp_store_cpu_info(int id) > >>

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Boris Ostrovsky
On 07/08/2015 12:17 PM, Dario Faggioli wrote: On Wed, 2015-07-08 at 16:38 +0100, Jan Beulich wrote: On 08.07.15 at 17:11, wrote: On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: On 08.07.15 at 11:36, wrote: @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; static void smp_store_cpu_info

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Jan Beulich
>>> On 08.07.15 at 18:17, wrote: > I think it has to do with the fact that I've got CPU #0 on socket #1, > while Boris' (and perhaps Chao's too) test box have it on socket #0. Ah, yes, this is indeed a case I didn't consider when validating Chao's analysis. Jan

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Dario Faggioli
On Wed, 2015-07-08 at 16:38 +0100, Jan Beulich wrote: > >>> On 08.07.15 at 17:11, wrote: > > On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: > >> >>> On 08.07.15 at 11:36, wrote: > >> > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; > >> > static void smp_store_cpu_info(int id) > >> > { >

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Boris Ostrovsky
On 07/08/2015 11:38 AM, Jan Beulich wrote: On 08.07.15 at 17:11, wrote: On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: On 08.07.15 at 11:36, wrote: @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; static void smp_store_cpu_info(int id) { struct cpuinfo_x86 *c = cpu_data + id;

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Jan Beulich
>>> On 08.07.15 at 17:11, wrote: > On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: >> >>> On 08.07.15 at 11:36, wrote: >> > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; >> > static void smp_store_cpu_info(int id) >> > { >> > struct cpuinfo_x86 *c = cpu_data + id; >> > +unsigned

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Dario Faggioli
On Wed, 2015-07-08 at 13:38 +0100, Jan Beulich wrote: > >>> On 08.07.15 at 11:36, wrote: > > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; > > static void smp_store_cpu_info(int id) > > { > > struct cpuinfo_x86 *c = cpu_data + id; > > +unsigned int socket; > > > > *c = boot_cpu_

Re: [Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Jan Beulich
>>> On 08.07.15 at 11:36, wrote: > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; > static void smp_store_cpu_info(int id) > { > struct cpuinfo_x86 *c = cpu_data + id; > +unsigned int socket; > > *c = boot_cpu_data; > if ( id != 0 ) > +{ > identify_cpu(c); > >

[Xen-devel] [PATCH] x86: correct socket_cpumask allocation for AP

2015-07-08 Thread Chao Peng
For AP, phys_proc_id is still not valid in CPU_PREPARE notifier (cpu_smpboot_alloc), so cpu_to_socket(cpu) is not valid as well. Introduce a pre-allocated secondary_cpu_mask so that later in smp_store_cpu_info() socket_cpumask[socket] can consume it. Signed-off-by: Chao Peng --- This is targeted