diff mbox

[Trusty/Utopic,SRU] Avoid xen balloon errors on AWS

Message ID 1414414567-24599-1-git-send-email-stefan.bader@canonical.com
State New
Headers show

Commit Message

Stefan Bader Oct. 27, 2014, 12:56 p.m. UTC
Has not marked stable but is supposed to finally close the AWS reports
about those messages flooding some instances dmesg.
Limited to the Xen balloon driver, so there is not much chance this
could cause problems outside. And outside AWS we could not get into
those failures in the first place. But I am preparing test kernels for
T as well.

-Stefan


From fd8b79511349efd1f0decea920f61b93acb34a75 Mon Sep 17 00:00:00 2001
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Date: Tue, 7 Oct 2014 17:00:07 -0400
Subject: [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@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>

BugLink: http://bugs.launchpad.net/bugs/1304001

(cherry-picked from commit fd8b79511349efd1f0decea920f61b93acb34a75 upstream)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 drivers/xen/balloon.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tim Gardner Oct. 27, 2014, 1:11 p.m. UTC | #1

Brad Figg Oct. 27, 2014, 3:02 p.m. UTC | #2
On 10/27/2014 05:56 AM, Stefan Bader wrote:
> Has not marked stable but is supposed to finally close the AWS reports
> about those messages flooding some instances dmesg.
> Limited to the Xen balloon driver, so there is not much chance this
> could cause problems outside. And outside AWS we could not get into
> those failures in the first place. But I am preparing test kernels for
> T as well.
> 
> -Stefan
> 
> 
> From fd8b79511349efd1f0decea920f61b93acb34a75 Mon Sep 17 00:00:00 2001
> From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Date: Tue, 7 Oct 2014 17:00:07 -0400
> Subject: [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@oracle.com>
> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1304001
> 
> (cherry-picked from commit fd8b79511349efd1f0decea920f61b93acb34a75 upstream)
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/xen/balloon.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index 1e0a317..3860d02 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -167,6 +167,9 @@ static struct page *balloon_next_page(struct page *page)
>  
>  static enum bp_state update_schedule(enum bp_state state)
>  {
> +	if (state == BP_ECANCELED)
> +		return BP_ECANCELED;
> +
>  	if (state == BP_DONE) {
>  		balloon_stats.schedule_delay = 1;
>  		balloon_stats.retry_count = 1;
>
Tim Gardner Oct. 27, 2014, 3:39 p.m. UTC | #3

diff mbox

Patch

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 1e0a317..3860d02 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -167,6 +167,9 @@  static struct page *balloon_next_page(struct page *page)
 
 static enum bp_state update_schedule(enum bp_state state)
 {
+	if (state == BP_ECANCELED)
+		return BP_ECANCELED;
+
 	if (state == BP_DONE) {
 		balloon_stats.schedule_delay = 1;
 		balloon_stats.retry_count = 1;