From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] xen/balloon: cancel ballooning if adding new memory failed Date: Thu, 29 Jan 2015 13:36:33 +0000 Message-ID: <1422538593.5198.1.camel@citrix.com> References: <1409593964-15144-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGpGx-00027B-LB for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 13:36:39 +0000 In-Reply-To: <1409593964-15144-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky , Daniel Kiper List-Id: xen-devel@lists.xenproject.org On Mon, 2014-09-01 at 18:52 +0100, David Vrabel wrote: > If the balloon driver is adding additional memory regions to the > balloon and add_memory() fails it will likely continuously fail so > cancel the balloon operation. > > Signed-off-by: David Vrabel https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776448 and https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1304001 seem to suggest this should be a candidate for stable backports? Ian. > --- > drivers/xen/balloon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c > index 5c660c7..1e0a317 100644 > --- a/drivers/xen/balloon.c > +++ b/drivers/xen/balloon.c > @@ -230,8 +230,8 @@ static enum bp_state reserve_additional_memory(long credit) > rc = add_memory(nid, hotplug_start_paddr, balloon_hotplug << PAGE_SHIFT); > > if (rc) { > - pr_info("%s: add_memory() failed: %i\n", __func__, rc); > - return BP_EAGAIN; > + pr_warn("Cannot add additional memory (%i)\n", rc); > + return BP_ECANCELED; > } > > balloon_hotplug -= credit;