From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Juergen Gross <juergen.gross@ts.fujitsu.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch 1/6] Cpupools: hypervisor part
Date: Tue, 20 Apr 2010 13:45:53 +0100 [thread overview]
Message-ID: <C7F36091.11E21%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <4BCD7623.1030507@ts.fujitsu.com>
Juergen,
I don't think there's any need to change the domain creation interfaces.
Drop new domains into a default pool, and then they can moved out (even
immediately) by further control operations. This will avoid changes to the
domain-creation public and private interfaces.
Also, you merge the cpu_add_remove_lock into a new cpupool_lock. That's not
actually safe since cpu_add_remove_lock is held on entry to
stopmachine_run(). Hence I assume now cpupool_lock is, and the only way to
avoid deadlock possibilities would be for everyone to only spin_trylock on
cpupool_lock, which isn't the case in your patch. Otherwise stopmachine_run
can hang waiting for a CPU to enter its smr handler, while that CPU is
waiting for the cpupool_lock to be released: a deadlock scenario.
I think you'll really need to find a method of synchronisation with cpu
hotplug which does not involve a lock that is held across stopmachine_run().
My first suggestion in this respect would be to take a look at
cpu_disable_scheduler(). This function deschedules vcpus from a cpu being
offlined, and notice you can go fairly hogwild with minimal locking
restrictions because everyone else is in a stopmachine 'safe place' with
irqs disabled. So they cannot concurrently conflict with you.
So hooking yourself off cpu_disable_scheduler(), or adding some other new
call-out from the end of __cpu_disable(), is quite probably the way to go to
update cpupool info, break affinities, or whatever else you need to do.
-- Keir
On 20/04/2010 10:38, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:
next prev parent reply other threads:[~2010-04-20 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 9:38 [Patch 1/6] Cpupools: hypervisor part Juergen Gross
2010-04-20 12:45 ` Keir Fraser [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-21 11:16 Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C7F36091.11E21%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=juergen.gross@ts.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).