[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Allow ACPI state change with active cpupools


  • To: Keir Fraser <keir.xen@xxxxxxxxx>
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Wed, 21 Mar 2012 14:46:30 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 21 Mar 2012 13:46:51 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=kySvy5ILvPOnJTkpK3o9vUeJv0t6w7F54z93jxtACeNCgy6h09B72GPy 0fBKtPO0PXwQxONyx07VkXPJSvRy3vecbJKzXaX+WQaU6bWyhcpQIolaT Ydinaf9fWn1xLGnGXgUGyJr1dfP6y/tjXSlhhhJIKnzKJphTgzygjXhUS axA2bP+L7jemWSrpejApjpo5N62UuRRw4+2/09hfHyNLgFGUJ9fuE2lKp 6EXljl5BZbdD+0lWtTYqnkxHcwFka;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 03/20/2012 03:55 PM, Keir Fraser wrote:
On 20/03/2012 14:46, "Juergen Gross"<juergen.gross@xxxxxxxxxxxxxx>  wrote:

Is it better to have cpupools know about offlining/suspend, or have
offlining/suspend know about cpupools? I would have thought the latter makes
more sense since it is offlining/suspend which calls into the cpupool
subsystem.
I thought of a more relaxed solution in the cpupool coding:

Instead of allowing to offline a cpu only if it is in Pool-0, I would allow it
if:
- the cpu is not the last one in the cpupool
- or no domain is active in the cpupool (this would include the suspend case,
    where all domains are paused)

Together with your proposal to remember the cpupool for an offlined cpu to add
it again when it is onlined the handling should be rather simple and local.
Ah, I see. Yes, a more flexible policy like this in the cpupool subsystem is
best solution of all, imo.

I have a problem with that solution. I had to change cpu_disable_scheduler() to
do a vcpu_migrate() only if the vcpu is runnable. When the ACPI state change
isn't permanent like in poweroff case I don't want to change vcpu affinities.
This action might be necessary in vcpu_wake() if v->processor isn't usable for
the vcpu any more.

Unfortunately vcpu_migrate() is calling evtchn_move_pirqs(), which taking the
domain event channel lock. And vcpu_wake() is called at least by send_evtchn()
with that lock already hold...

Is it possible to use spin_lock_recursive() for the domain event channel lock?

Another solution would be to omit the vcpu_migrate() in cpu_disable_scheduler()
for paused vcpus only and to do it when unpausing the vcpu, but this would
leak scheduler internals...


Juergen

--
Juergen Gross                 Principal Developer Operating Systems
PDG ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.