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

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


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Date: Mon, 12 May 2014 13:49:45 +0200
  • Cc: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
  • Delivery-date: Mon, 12 May 2014 11:50:01 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer; b=o0ZsgQwa6nP+++2vp1fDT6bnhT/BpzOW3LDGCmhAalG+DXxjSCaYolKq xE8OTx/Nb059wxia4jCtfi4hZa8CNOfoNseVapGMNTR6AZ4qA4IRPCVqE xLzK3OCaFIg1Qk2amX/sDY4yqu6YNSYpDcaGUhKJyU2I5qlcpiBNgFbUT /y7FUh5tg//u/YrUBdQbMcQj57NdiCqxzn+VIhZX23Z3iF1tZkYhrCtyr 9DIJVCq3JPr7NHudzE8eoPR28EKKY;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

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.

Signed-off-by: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
---
 xen/common/cpupool.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 4a0e569..ac833f0 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -348,6 +348,8 @@ static int cpupool_unassign_cpu(struct cpupool *c, unsigned 
int cpu)
             cpupool0->n_dom++;
         }
         rcu_read_unlock(&domlist_read_lock);
+        if ( (c->n_dom > 0) && !ret )
+            ret = -EAGAIN;
         if ( ret )
             goto out;
     }
-- 
1.7.10.4


_______________________________________________
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®.