|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH] libxc/migration: Abort migration on precopy policy request
On Wed, Apr 08, 2020 at 12:06:22AM +0200, Panyakin, Andrew wrote:
> On 4/7/20 10:22 PM, Wei Liu wrote:
> > On Tue, Apr 07, 2020 at 02:52:22PM +0000, Andrew Panyakin wrote:
> >> libxc defines XGS_POLICY_ABORT for precopy policy to signal that migration
> >> should be aborted (eg. if the estimated pause time is too huge for the
> >> instance). Default simple precopy policy never returns that, but it could
> >> be
> >> overriden with a custom one.
> >>
> >
> > Right. I think this is a real problem.
> >
> >> Signed-off-by: Andrew Panyakin <apanyaki@xxxxxxxxxx>
> >> ---
> >> tools/libxc/xc_sr_save.c | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>
> >> diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
> >> index fa736a311f..507274ce22 100644
> >> --- a/tools/libxc/xc_sr_save.c
> >> +++ b/tools/libxc/xc_sr_save.c
> >> @@ -560,6 +560,12 @@ static int send_memory_live(struct xc_sr_context *ctx)
> >>
> >> }
> >>
> >> + if ( policy_decision == XGS_POLICY_ABORT ) {
> >
> > The { should be on a new line.
> >
> >> + PERROR("Abort precopy loop");
> >> + rc = -1;
> >> + goto out;
> >
> > There is no need to have "goto out" here.
>
> I was considering two more examples of "goto out" in a branch right before
> the label:
> - send_domain_memory_nonlive,
> - send_domain_memory_live.
>
> Isn't it done this way to simplify the function extension: you won't need to
> add "goto out" to previous branch when adding new code?
I'm not too fussed about this. Let's keep goto out.
Acked-by: Wei Liu <wl@xxxxxxx>
I will apply this patch shortly.
Wei.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |