|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen/balloon: Don't continue ballooning when BP_ECANCELED is encountered
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);
#ifndef CONFIG_PREEMPT
if (need_resched())
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |