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

Re: [Xen-devel] [PATCH] cpupools: retry cpupool-destroy if domain in cpupool is dying

  • To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Wed, 14 May 2014 11:56:53 +0200
  • Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 14 May 2014 09:57:04 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Message-ID:Date:From:Organization:User-Agent: MIME-Version:To:CC:Subject:References:In-Reply-To: Content-Type:Content-Transfer-Encoding; b=Hx9hsQDntupoymePbi85/kKcl9HSdMxkuU2u3MkkBOvni58mbv2w6UTf tK+K9/2np60+lw8I08sxWdlFEipZ/E6ve8DxmZ7JyrsgDYiInqqo0m0F0 /JaaqM7UY772endM5FSSALQ5+L17wIdx9VV9HdU8PHwampHu0HzxhG9qd 0Ryd3/ODRd4gxYAbwPMuRXpX3XH9Z1MGNJYaJ6gfp6l4fX6QE9Brnnr4L mUSgmQ+ff1nlP4pjPewu9HR7aaPVu;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 14.05.2014 11:16, George Dunlap wrote:
On Mon, May 12, 2014 at 12:49 PM, Juergen Gross
<juergen.gross@xxxxxxxxxxxxxx> wrote:
When a cpupool is destroyed just after the last domain has been stopped the
domain might already be removed from the domain list without being removed
from the cpupool.
It is easy to detect this situation and to return EAGAIN in this case which
is already handled in libxc by doing a retry.

OK, I hate to be picky over two lines, but it still seems to me like
this is papering over issues instead of dealing with them properly.
The real problem here is that "for_each_domain_in_cpupool()" doesn't
actually go over every domain in the cpupool.  Instead of making it so
that it actually does, you're compensating for that fact in an ad-hoc

Now as it happens, it looks like all the other current uses of
for_each_domain_in_cpupool() work just fine if there are domains in
the pool it doesn't see, as long as they're about to disappear.  But
we've already seen a bug caused because of a situation where "don't
see domains that are about to disappear" *does* actually cause a
problem; working around it is just setting a trap for future
developers to fall into.  (And who knows, there may already be a bug
we haven't discovered in the other invocations of

This isn't unique to for_each_domain_in_cpupool(). It is a problem for all
uses of for_each_domain() which are related to resources freed only in

In theory I could built a domain list for each cpupool which I could use for
for_each_domain_in_cpupool(). In this case there would be situations when
for_each_domain_in_cpupool() sees a domain which isn't seen by
for_each_domain(). Do you think this would be better? I don't.


Juergen Gross                 Principal Developer Operating Systems
PSO PM&D ES&S SWE OS6                  Telephone: +49 (0) 89 62060 2932
Fujitsu                                   e-mail: juergen.gross@xxxxxxxxxxxxxx
Mies-van-der-Rohe-Str. 8                Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

Xen-devel mailing list



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