[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] remus: make postcopy callback asynchronous
commit cbe8115b6b1cc8a3a886de61ac3f690caad720c9 Author: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> AuthorDate: Wed Jul 2 16:09:11 2014 +0800 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Jul 3 10:49:29 2014 +0100 remus: make postcopy callback asynchronous Make postcopy callback asynchronous. This is a prepare patch of the following patch series. Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_dom.c | 10 +++++++--- tools/libxl/libxl_save_msgs_gen.pl | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 0448d17..83eb29a 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1479,18 +1479,22 @@ static void remus_domain_suspend_callback_common_done(libxl__egc *egc, libxl__xc_domain_saverestore_async_callback_done(egc, &dss->shs, ok); } -static int libxl__remus_domain_resume_callback(void *data) +static void libxl__remus_domain_resume_callback(void *data) { + int ok = 0; libxl__save_helper_state *shs = data; + libxl__egc *egc = shs->egc; libxl__domain_suspend_state *dss = CONTAINER_OF(shs, *dss, shs); STATE_AO_GC(dss->ao); /* Resumes the domain and the device model */ if (libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1)) - return 0; + goto out; /* REMUS TODO: Deal with disk. Start a new network output buffer */ - return 1; + ok = 1; +out: + libxl__xc_domain_saverestore_async_callback_done(egc, shs, ok); } /*----- remus asynchronous checkpoint callback -----*/ diff --git a/tools/libxl/libxl_save_msgs_gen.pl b/tools/libxl/libxl_save_msgs_gen.pl index 88f4921..6b4b65e 100755 --- a/tools/libxl/libxl_save_msgs_gen.pl +++ b/tools/libxl/libxl_save_msgs_gen.pl @@ -24,7 +24,7 @@ our @msgs = ( 'unsigned long', 'done', 'unsigned long', 'total'] ], [ 3, 'scxA', "suspend", [] ], - [ 4, 'scxW', "postcopy", [] ], + [ 4, 'scxA', "postcopy", [] ], [ 5, 'scxA', "checkpoint", [] ], [ 6, 'scxA', "switch_qemu_logdirty", [qw(int domid unsigned enable)] ], -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |