From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH] xen: cpupool: fix shutdown with cpupools with different schedulers Date: Thu, 11 Jun 2015 15:24:51 +0100 Message-ID: <55799A33.1070608@eu.citrix.com> References: <20150611123151.6295.14758.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z33Pm-000642-9J for xen-devel@lists.xenproject.org; Thu, 11 Jun 2015 14:25:06 +0000 In-Reply-To: <20150611123151.6295.14758.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli , xen-devel@lists.xenproject.org Cc: Juergen Gross , Tim Deegan , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 06/11/2015 01:31 PM, Dario Faggioli wrote: > trying to shutdown the host when a cpupool exists, has > pCPUs, and has a scheduler different than the Xen's default > one, produces this: > > root@Zhaman:~# xl cpupool-cpu-remove Pool-0 8 > root@Zhaman:~# xl cpupool-create name=\"Pool-1\" sched=\"credit2\" > Using config file "command line" > cpupool name: Pool-1 > scheduler: credit2 > number of cpus: 0 > root@Zhaman:~# xl cpupool-cpu-add Pool-1 8 > root@Zhaman:~# shutdown -h now > > (XEN) ----[ Xen-4.6-unstable x86_64 debug=y Not tainted ]---- > (XEN) CPU: 0 > (XEN) RIP: e008:[] kill_timer+0x56/0x298 > (XEN) RFLAGS: 0000000000010002 CONTEXT: hypervisor > ... ... ... > (XEN) Xen call trace: > (XEN) [] kill_timer+0x56/0x298 > (XEN) [] csched_free_pdata+0x9b/0xcf > (XEN) [] cpu_schedule_callback+0x64/0x8b > (XEN) [] notifier_call_chain+0x67/0x87 > (XEN) [] cpu_down+0xd9/0x12c > (XEN) [] disable_nonboot_cpus+0x93/0x138 > (XEN) [] enter_state_helper+0xbd/0x365 > (XEN) [] continue_hypercall_tasklet_handler+0x4a/0xb1 > (XEN) [] do_tasklet_work+0x78/0xab > (XEN) [] do_tasklet+0x5e/0x8a > (XEN) [] idle_loop+0x56/0x6b > ... ... ... > (XEN) **************************************** > (XEN) Panic on CPU 0: > (XEN) FATAL PAGE FAULT > (XEN) [error_code=0000] > (XEN) Faulting linear address: 0000000000000041 > (XEN) **************************************** > > The fix is, when tearing down a pCPU, call the free_pdata() > hook from the scheduler of the cpupool the pCPU belongs to, > not always the one from the default scheduler. > > Signed-off-by: Dario Faggioli Acked-by: George Dunlap