libxl/remus: fix the return value of the checkpoint callback
PATCH 1/1 libxl/remus: fix the return value of the checkpoint callback
In checkpoint callback, we wait for the interval and then start another checkpoint, so the ERROR_TIMEDOUT should be intended and should not treat as error.
This patch is based on
[PATCH v8 --for 4.6 COLO 00/25] COarse-grain LOck-stepping Virtual Machines for Non-stop Service
--- tools/libxl/libxl_remus.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
tools/libxl/libxl_remus.c +7 -4
@@ -355,11 +355,14 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,* (xc_domain_save.c). in order to continue executing the infinite loop * (suspend, checkpoint, resume) in xc_domain_save(). */ - -if (rc) +if (rc ==ERROR_TIMEDOUT ) { +/* This is intended, we set the timeout and start another checkpoint */ +libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs,1 ); + }else { dss->rc = rc; - -libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs, !rc); +libxl__xc_domain_saverestore_async_callback_done (egc, + &dss->sws.shs, !rc); + } }/*---------------------- remus callbacks (restore) -----------------------*/
Signature · 1 line
1.9.1
Quoted 6 lines · Yang Hongyang
In checkpoint callback, we wait for the interval and then start another checkpoint, so the
ERROR_TIMEDOUTshould be intended and should not treat as error.This patch is based on
[PATCH v8 --for 4.6 COLO 00/25] COarse-grain LOck-stepping Virtual Machines for Non-stop Service
Does that mean it won't apply to current staging?
I think we probably want this fix ASAP rather than waiting for that series?
Quoted 13 lines
Signed-off-by Yang Hongyang <[email protected]>CC Ian Jackson <[email protected]>CC Ian Campbell <[email protected]>CC Wei Liu <[email protected]>--- tools/libxl/libxl_remus.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)tools/libxl/libxl_remus.c +0
-0
tools/libxl/libxl_remus.c static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev, · line 360
Quoted 8 lines
tools/libxl/libxl_remus.c +3
-2@@ -355,11 +355,14 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,* (xc_domain_save.c). in order to continue executing the infinite loop * (suspend, checkpoint, resume) in xc_domain_save(). */ - -if (rc) +if (rc ==ERROR_TIMEDOUT ) { +/* This is intended, we set the timeout and start another checkpoint */ +libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs,1 );
Please wrap this (slightly) overlong line (and probably the comment too which is borderline AFAICT).
Quoted 10 lines
tools/libxl/libxl_remus.c +4
-2+ }else { dss->rc = rc; - -libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs, !rc); +libxl__xc_domain_saverestore_async_callback_done (egc, + &dss->sws.shs, !rc); + } }/*---------------------- remus callbacks (restore) -----------------------*/
Quoted 9 lines · Ian Campbell
Quoted 6 lines · Yang Hongyang
In checkpoint callback, we wait for the interval and then start another checkpoint, so the
ERROR_TIMEDOUTshould be intended and should not treat as error.This patch is based on
[PATCH v8 --for 4.6 COLO 00/25] COarse-grain LOck-stepping Virtual Machines for Non-stop ServiceDoes that mean it won't apply to current staging?
No. This can apply on top of colo pre series.
Quoted 3 lines
I think we probably want this fix ASAP rather than waiting for that series?
I can resubmit the patch apply to staging, but the colo pre series will need to be rebased...
Quoted 40 lines
Quoted 14 lines
Signed-off-by Yang Hongyang <[email protected]>CC Ian Jackson <[email protected]>CC Ian Campbell <[email protected]>CC Wei Liu <[email protected]>--- tools/libxl/libxl_remus.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)tools/libxl/libxl_remus.c +0
-0tools/libxl/libxl_remus.c static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev, · line 360
Quoted 8 lines
tools/libxl/libxl_remus.c +3
-2@@ -355,11 +355,14 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,* (xc_domain_save.c). in order to continue executing the infinite loop * (suspend, checkpoint, resume) in xc_domain_save(). */ - -if (rc) +if (rc ==ERROR_TIMEDOUT ) { +/* This is intended, we set the timeout and start another checkpoint */ +libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs,1 );Please wrap this (slightly) overlong line (and probably the comment too which is borderline AFAICT).
tools/libxl/libxl_remus.c static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev, · line 368
Quoted 10 lines
tools/libxl/libxl_remus.c +4
-2+ }else { dss->rc = rc; - -libxl__xc_domain_saverestore_async_callback_done (egc, &dss->sws.shs, !rc); +libxl__xc_domain_saverestore_async_callback_done (egc, + &dss->sws.shs, !rc); + } }/*---------------------- remus callbacks (restore) -----------------------*/ .
Signature · 2 lines
Thanks, Yang.
PATCH 1/1 libxl: events: Do not abort remus with ERROR_TIMEOUT
In reply to Ian CampbellWhen the timeout set for prompting the next remus iteration fires, we should not treat the ERROR_TIMEDOUT as an error.
Bug in 31c836f4 "libxl: events: Permit timeouts to signal ao abort".
--- tools/libxl/libxl_dom.c | 3 +++ 1 file changed, 3 insertions(+)
tools/libxl/libxl_dom.c +3 -0
@@ -2024,6 +2024,9 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,STATE_AO_GC (dss->ao); +if (rc ==ERROR_TIMEDOUT )/* As intended */ + rc =0 ; +/* * Time to checkpoint the guest again. We return 1 to libxc * (xc_domain_save.c). in order to continue executing the infinite loop
Signature · 1 line
1.7.10.4
Re: [PATCH] libxl: events: Do not abort remus with ERROR_TIMEOUT
Quoted 9 lines · Ian Jackson
When the timeout set for prompting the next remus iteration fires, we should not treat the
ERROR_TIMEDOUTas an error.Bug in
31c836f4"libxl: events: Permit timeouts to signal ao abort".Reported-by Yang Hongyang <[email protected]>Signed-off-by Ian Jackson <[email protected]>CC Yang Hongyang <[email protected]>CC Wei Liu <[email protected]>
Re: [PATCH] libxl: events: Do not abort remus with ERROR_TIMEOUT
In reply to Ian JacksonQuoted 10 lines · Ian Jackson
When the timeout set for prompting the next remus iteration fires, we should not treat the
ERROR_TIMEDOUTas an error.Bug in
31c836f4"libxl: events: Permit timeouts to signal ao abort".Reported-by Yang Hongyang <[email protected]>Signed-off-by Ian Jackson <[email protected]>CC Yang Hongyang <[email protected]>CC Wei Liu <[email protected]>CC Ian Campbell <[email protected]>
Quoted 20 lines
--- tools/libxl/libxl_dom.c | 3 +++ 1 file changed, 3 insertions(+)tools/libxl/libxl_dom.c +3
-0@@ -2024,6 +2024,9 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,STATE_AO_GC (dss->ao); +if (rc ==ERROR_TIMEDOUT )/* As intended */ + rc =0 ; +/* * Time to checkpoint the guest again. We return 1 to libxc * (xc_domain_save.c). in order to continue executing the infinite loop Signature · 1 line
1.7.10.4
Re: [PATCH] libxl: events: Do not abort remus with ERROR_TIMEOUT
In reply to Ian JacksonQuoted 10 lines · Ian Jackson
When the timeout set for prompting the next remus iteration fires, we should not treat the
ERROR_TIMEDOUTas an error.Bug in
31c836f4"libxl: events: Permit timeouts to signal ao abort".Reported-by Yang Hongyang <[email protected]>Signed-off-by Ian Jackson <[email protected]>CC Yang Hongyang <[email protected]>CC Wei Liu <[email protected]>CC Ian Campbell <[email protected]>
Quoted 19 lines
--- tools/libxl/libxl_dom.c | 3 +++ 1 file changed, 3 insertions(+)tools/libxl/libxl_dom.c +3
-0@@ -2024,6 +2024,9 @@ static void remus_next_checkpoint(libxl__egc *egc, libxl__ev_time *ev,STATE_AO_GC (dss->ao); +if (rc ==ERROR_TIMEDOUT )/* As intended */ + rc =0 ; +/* * Time to checkpoint the guest again. We return 1 to libxc * (xc_domain_save.c). in order to continue executing the infinite loop
Signature · 2 lines
Thanks, Yang.
Ian Campbell
AppliedRe: [PATCH] libxl: events: Do not abort remus with ERROR_TIMEOUT
Quoted 7 lines · Yang Hongyang
Quoted 5 lines · Ian Jackson
When the timeout set for prompting the next remus iteration fires, we should not treat the
ERROR_TIMEDOUTas an error.Bug in
31c836f4"libxl: events: Permit timeouts to signal ao abort".
Quoted 7 lines
Quoted 5 lines
Reported-by Yang Hongyang <[email protected]>Signed-off-by Ian Jackson <[email protected]>CC Yang Hongyang <[email protected]>CC Wei Liu <[email protected]>CC Ian Campbell <[email protected]>Acked-by Yang Hongyang <[email protected]>
Applied, thanks.
Ian Campbell writes ("Re: [PATCH] libxl/remus: fix the return value of the checkpoint callback"):
Quoted 1 line
Does that mean it won't apply to current staging?
Indeed it doesn't.
Quoted 2 lines
I think we probably want this fix ASAP rather than waiting for that series?
Yes. Patch just sent. Untested but fairly obvious. Yang, do you want to test this, or do you want us to apply it as-is ? I don't have a remus test setup.
This is the second rc-handling bug in 31c836f4 "libxl: events: Permit timeouts to signal ao abort". I am going to re-read that patch to see if I can find any more.
Ian.
Quoted 11 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH] libxl/remus: fix the return value of the checkpoint callback"):
Quoted 1 line
Does that mean it won't apply to current staging?
Indeed it doesn't.
Quoted 2 lines
I think we probably want this fix ASAP rather than waiting for that series?
Yes. Patch just sent. Untested but fairly obvious. Yang, do you want to test this, or do you want us to apply it as-is ? I don't have a remus test setup.
Please apply, thanks!
Quoted 8 lines
This is the second rc-handling bug in
31c836f4"libxl: events: Permit timeouts to signal ao abort". I am going to re-read that patch to see if I can find any more.Ian.
.
Signature · 2 lines
Thanks, Yang.