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

2015-07-12 Thread Chao Peng
On Fri, Jul 10, 2015 at 06:03:54PM +0200, Dario Faggioli wrote: > On Fri, 2015-07-10 at 16:25 +0100, Jan Beulich wrote: > > >>> On 10.07.15 at 17:13, wrote: > > > > cpu_down() > > > stop_machine_run(take_cpu_down, ...) > > > notifier_call_chain(&cpu_chain, CPU_DYING, ...) > > > __cpu_di

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

2015-07-10 Thread Dario Faggioli
On Fri, 2015-07-10 at 16:25 +0100, Jan Beulich wrote: > >>> On 10.07.15 at 17:13, wrote: > > cpu_down() > > stop_machine_run(take_cpu_down, ...) > > notifier_call_chain(&cpu_chain, CPU_DYING, ...) > > __cpu_disable() > > remove_siblinginfo() > > __cpu_die() > > notifier_call_cha

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

2015-07-10 Thread Dario Faggioli
On Fri, 2015-07-10 at 16:13 +0100, Jan Beulich wrote: > >>> On 10.07.15 at 16:57, wrote: > > ... > > (XEN) Preparing system for ACPI S5 state. > > (XEN) Disabling non-boot CPUs ... > > (XEN) Broke affinity for irq 9 > > (XEN) cpu=1 cpu_to_socket=4294967295 > > (XEN) [ Xen-4.6-unstable x86_

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

2015-07-10 Thread Jan Beulich
>>> On 10.07.15 at 17:13, wrote: On 10.07.15 at 16:57, wrote: >> I added this printk: >> >> printk(" cpu=%u cpu_to_socket=%u\n", cpu, socket); >> >> Right before this chunk of code, in cpu_smpboot_free(): >> >> if ( cpumask_empty(socket_cpumask[socket]) ) >> { >> xfree(so

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

2015-07-10 Thread Jan Beulich
>>> On 10.07.15 at 16:57, wrote: > I added this printk: > > printk(" cpu=%u cpu_to_socket=%u\n", cpu, socket); > > Right before this chunk of code, in cpu_smpboot_free(): > > if ( cpumask_empty(socket_cpumask[socket]) ) > { > xfree(socket_cpumask[socket]); > socket_cpum

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

2015-07-10 Thread Dario Faggioli
On Fri, 2015-07-10 at 15:47 +0100, Andrew Cooper wrote: > On 10/07/15 15:29, Dario Faggioli wrote: > > (XEN) Xen call trace: > > (XEN)[] cpu_smpboot_free+0x2b/0x255 > > (XEN)[] cpu_smpboot_callback+0x317/0x327 > > (XEN)[] notifier_call_chain+0x67/0x87 > > (XEN)[] cpu_down+0xd9/0x12

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

2015-07-10 Thread Andrew Cooper
On 10/07/15 15:29, Dario Faggioli wrote: > On Thu, 2015-07-09 at 22:23 +0800, Chao Peng wrote: >> For booting cpu, the socket number is not needed to be 0 so >> it needs to be computed by cpu number. >> > This made my system boot, yes... but now it does not shutdown! :-/ > > I'm attaching the splat

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

2015-07-10 Thread Dario Faggioli
On Thu, 2015-07-09 at 22:23 +0800, Chao Peng wrote: > For booting cpu, the socket number is not needed to be 0 so > it needs to be computed by cpu number. > This made my system boot, yes... but now it does not shutdown! :-/ I'm attaching the splat I see, reliably, on my testbox. I'll try have a

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

2015-07-09 Thread Boris Ostrovsky
On 07/09/2015 11:16 AM, Andrew Cooper wrote: On 09/07/15 15:23, Chao Peng wrote: For booting cpu, the socket number is not needed to be 0 so it needs to be computed by cpu number. For secondary cpu, phys_proc_id is not valid in CPU_PREPARE notifier(cpu_smpboot_alloc), so cpu_to_socket(cpu) can'

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

2015-07-09 Thread Andrew Cooper
On 09/07/15 15:23, Chao Peng wrote: > For booting cpu, the socket number is not needed to be 0 so > it needs to be computed by cpu number. > > For secondary cpu, phys_proc_id is not valid in CPU_PREPARE > notifier(cpu_smpboot_alloc), so cpu_to_socket(cpu) can't be used. > Instead, pre-allocate seco

[Xen-devel] [PATCH v3] x86: correct socket_cpumask allocation

2015-07-09 Thread Chao Peng
For booting cpu, the socket number is not needed to be 0 so it needs to be computed by cpu number. For secondary cpu, phys_proc_id is not valid in CPU_PREPARE notifier(cpu_smpboot_alloc), so cpu_to_socket(cpu) can't be used. Instead, pre-allocate secondary_cpu_mask in cpu_smpboot_alloc() and later