|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/balloon: Don't continue ballooning when BP_ECANCELED is encountered
On Tue, Oct 07, 2014 at 11:58:25AM -0400, Boris Ostrovsky wrote:
> Commit 3dcf63677d4e ("xen/balloon: cancel ballooning if adding new memory
> failed") makes reserve_additional_memory() return BP_ECANCELED when an
> error is encountered. This error, however, is ignored by the caller
> (balloon_process()) since it is overwritten by subsequent call to
> update_schedule(). This results in continuous attempts to add more
> memory, all of which are likely to fail again.
>
> We should stop trying to schedule next iteration of ballooning when
> the current one has failed.
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> ---
> drivers/xen/balloon.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index 1e0a317..5de9bb2 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -482,7 +482,8 @@ static void balloon_process(struct work_struct *work)
> if (credit < 0)
> state = decrease_reservation(-credit, GFP_BALLOON);
>
> - state = update_schedule(state);
> + if (state != BP_ECANCELED)
> + state = update_schedule(state);
OK, but please do that in update_schedule() just in first line:
if (state == BP_ECANCELED)
return BP_ECANCELED;
Daniel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |