From: Wei Wang <wei.w.wang@intel.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, mst@redhat.com
Cc: mhocko@kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM
Date: Sun, 22 Oct 2017 19:31:43 +0800 [thread overview]
Message-ID: <59EC819F.1080205@intel.com> (raw)
In-Reply-To: <201710221311.FFI17148.VStOJQLHOFFMOF@I-love.SAKURA.ne.jp>
On 10/22/2017 12:11 PM, Tetsuo Handa wrote:
> Michael S. Tsirkin wrote:
>>> - num_freed_pages = leak_balloon(vb, oom_pages);
>>> +
>>> + /* Don't deflate more than the number of inflated pages */
>>> + while (npages && atomic64_read(&vb->num_pages))
>>> + npages -= leak_balloon(vb, npages);
> don't we need to abort if leak_balloon() returned 0 for some reason?
I don't think so. Returning 0 should be a normal case when the host tries
to give back some pages to the guest, but there is no pages that have ever
been inflated. For example, right after booting the guest, the host sends a
deflating request to give the guest 1G memory, leak_balloon should return 0,
and guest wouldn't get 1 more G memory.
Best,
Wei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-10-22 11:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 11:54 [PATCH v1 0/3] Virtio-balloon Improvement Wei Wang
2017-10-20 11:54 ` [PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock Wei Wang
2017-10-22 5:20 ` Tetsuo Handa
2017-10-22 11:24 ` Wei Wang
2017-10-22 11:50 ` Tetsuo Handa
2017-10-24 1:46 ` Wei Wang
2017-10-20 11:54 ` [PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM Wei Wang
2017-10-22 3:21 ` Michael S. Tsirkin
2017-10-22 4:11 ` Tetsuo Handa
2017-10-22 11:31 ` Wei Wang [this message]
2017-10-20 11:54 ` [PATCH v1 3/3] virtio-balloon: stop inflating when OOM occurs Wei Wang
2017-10-22 17:13 ` Michael S. Tsirkin
2017-10-24 1:58 ` Wei Wang
2017-10-22 3:19 ` [PATCH v1 0/3] Virtio-balloon Improvement Michael S. Tsirkin
2017-10-22 11:19 ` Wei Wang
2017-11-03 8:35 ` Wei Wang
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=59EC819F.1080205@intel.com \
--to=wei.w.wang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mst@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=virtualization@lists.linux-foundation.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