[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, 07 May 2014 15:23:01 +0200
- Cc: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
- Delivery-date: Wed, 07 May 2014 13:24:15 +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=iCXBZwxC7ctkgpuGgv6t3WU1D3Yyy/fnIAR80kWX0lGYmbQMrjgNVrcP 0mO3wr2TXY6NiIraEFDCIa1qcSo+fA8VI0Gg2aAFfT3KK4Mb8oWddFxYU 26PzzpDdRyHon5+yf2lVxBcj4+Zrm3hR48KfkRCqFtEOSjWRV4vzka27I MRHX9lGZqbfrnbo4sz9390jM/Wrc32KSCilzNadMiF2WwYR/5aPla0OkH gdBkurL//zKIDJ+8Ap6MynLx3k6BA;
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On 07.05.2014 15:10, George Dunlap wrote:
On Wed, May 7, 2014 at 8:52 AM, 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 cpupool without having decremented
the domain count of the cpupool. This will result in rejection of the
cpupool-destroy operation.
I'm a bit confused. What's the sched_move_domain() for, then? If
we're going to handle "dying domains" by doing a retry, could we just
get rid of it?
The sched_move_domain() is still needed for cases where a domain stays
dying for a longer time, e.g. when a dom0 process is still referencing
some of it's memory pages. This may be a rare situation, but being unable
to use a physical cpu for another cpupool just because of this case is
worse than this little piece of code, IMO.
Juergen
-George
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
--
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
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|