|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall return e
On Thu, Aug 09, 2007 at 10:52:14AM +0100, Keir Fraser wrote:
> Attached is a cleaned-up version of your patch. One change is that
> getdomaininfo does not return 'dying' until domain_kill() is fully
> completed. This will prevent tools from not retrying domain_kill() because
> it looks like it's already been executed!
Thank you for reviewing.
test_and_set_bool(d->is_dying) is used to avoid race, isn't it?
But the updated patch drops it so that it would be racy.
> One thing is still missing though -- where do you intend to put the retry
> loop in the toolstack?
I inserted it to privcmd driver at first.
But it would be appropriate to insert the logic to xc_domain_destroy()
of libxc.
Which do you prefer?
# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1186653836 -32400
# Node ID 9efffe2118469a6e9964ffd0e757d4df3d1e1a7b
# Parent 68e21f17cfeb09f898eb38df14234469895b8181
retry destroy domain hypercall until success.
PATCHNAME: retry_destroy_domain_hypercall_until_success
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 68e21f17cfeb -r 9efffe211846 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Thu Aug 09 16:19:18 2007 +0900
+++ b/tools/libxc/xc_domain.c Thu Aug 09 19:03:56 2007 +0900
@@ -55,10 +55,14 @@ int xc_domain_destroy(int xc_handle,
int xc_domain_destroy(int xc_handle,
uint32_t domid)
{
+ int ret;
DECLARE_DOMCTL;
domctl.cmd = XEN_DOMCTL_destroydomain;
domctl.domain = (domid_t)domid;
- return do_domctl(xc_handle, &domctl);
+ do {
+ ret = do_domctl(xc_handle, &domctl);
+ } while (ret == -EAGAIN);
+ return ret;
}
int xc_domain_shutdown(int xc_handle,
--
yamahata
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|