Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-06 Thread Chao Peng
On Wed, May 06, 2015 at 08:16:40AM +0100, Jan Beulich wrote: > >>> On 06.05.15 at 09:05, wrote: > > On Tue, May 05, 2015 at 11:43:57AM +0100, Jan Beulich wrote: > >> >>> On 05.05.15 at 12:25, wrote: > >> > My concern is the original APIC IDs do not need to be consecutive. Then > >> > in such case

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-06 Thread Jan Beulich
>>> On 06.05.15 at 09:05, wrote: > On Tue, May 05, 2015 at 11:43:57AM +0100, Jan Beulich wrote: >> >>> On 05.05.15 at 12:25, wrote: >> > My concern is the original APIC IDs do not need to be consecutive. Then >> > in such case even we do >> > >> > DIV_ROUND_UP(cpu_num_from_madt, boot_cpu_data.x8

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-06 Thread Chao Peng
On Tue, May 05, 2015 at 11:43:57AM +0100, Jan Beulich wrote: > >>> On 05.05.15 at 12:25, wrote: > > On Tue, May 05, 2015 at 10:11:15AM +0100, Jan Beulich wrote: > >> >>> On 05.05.15 at 09:44, wrote: > >> > On Fri, Apr 24, 2015 at 03:46:11PM +0100, Jan Beulich wrote: > >> >> >>> On 23.04.15 at 11:

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-05 Thread Jan Beulich
>>> On 05.05.15 at 12:25, wrote: > On Tue, May 05, 2015 at 10:11:15AM +0100, Jan Beulich wrote: >> >>> On 05.05.15 at 09:44, wrote: >> > On Fri, Apr 24, 2015 at 03:46:11PM +0100, Jan Beulich wrote: >> >> >>> On 23.04.15 at 11:55, wrote: >> >> > @@ -717,6 +722,14 @@ void __init smp_prepare_cpus(u

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-05 Thread Chao Peng
On Tue, May 05, 2015 at 10:11:15AM +0100, Jan Beulich wrote: > >>> On 05.05.15 at 09:44, wrote: > > On Fri, Apr 24, 2015 at 03:46:11PM +0100, Jan Beulich wrote: > >> >>> On 23.04.15 at 11:55, wrote: > >> > @@ -717,6 +722,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > >> > > >> >

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-05 Thread Jan Beulich
>>> On 05.05.15 at 09:44, wrote: > On Fri, Apr 24, 2015 at 03:46:11PM +0100, Jan Beulich wrote: >> >>> On 23.04.15 at 11:55, wrote: >> > @@ -717,6 +722,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) >> > >> > stack_base[0] = stack_start; >> > >> > +nr_sockets = DIV_ROUND_U

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-05-05 Thread Chao Peng
On Fri, Apr 24, 2015 at 03:46:11PM +0100, Jan Beulich wrote: > >>> On 23.04.15 at 11:55, wrote: > > @@ -301,6 +304,8 @@ static void set_cpu_sibling_map(int cpu) > > } > > } > > } > > + > > +cpumask_set_cpu(cpu, &socket_to_cpumask[cpu_to_socket(cpu)]); > > } > > The

Re: [Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-04-24 Thread Jan Beulich
>>> On 23.04.15 at 11:55, wrote: > @@ -301,6 +304,8 @@ static void set_cpu_sibling_map(int cpu) > } > } > } > + > +cpumask_set_cpu(cpu, &socket_to_cpumask[cpu_to_socket(cpu)]); > } There is an early return path in this function, which you need to deal with. > @@ -

[Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-04-23 Thread Chao Peng
Maintain socket_to_cpumask which contains all the HT and core siblings in the same socket. Signed-off-by: Chao Peng --- xen/arch/x86/smpboot.c| 15 +++ xen/include/asm-x86/smp.h | 8 2 files changed, 23 insertions(+) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/s