From: Daniel Kiper <daniel.kiper@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: david.vrabel@citrix.com, konrad.wilk@oracle.com,
xen-devel@lists.xen.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] xen/balloon: Don't continue ballooning when BP_ECANCELED is encountered
Date: Wed, 8 Oct 2014 09:30:11 +0200 [thread overview]
Message-ID: <20141008073011.GG3460@olila.local.net-space.pl> (raw)
In-Reply-To: <1412715607-16751-1-git-send-email-boris.ostrovsky@oracle.com>
On Tue, Oct 07, 2014 at 05:00:07PM -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@oracle.com>
> ---
> v2: Move status test to update_schedule()
>
> 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;
Thanks. Please next time send Linux Kernel patches to LKML too.
Cc-ing it just in case.
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
parent reply other threads:[~2014-10-08 7:30 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1412715607-16751-1-git-send-email-boris.ostrovsky@oracle.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141008073011.GG3460@olila.local.net-space.pl \
--to=daniel.kiper@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®