From: Wei Wang <wei.w.wang@intel.com> To: "Michael S. Tsirkin" <mst@redhat.com> Cc: penguin-kernel@I-love.SAKURA.ne.jp, mhocko@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v1 0/3] Virtio-balloon Improvement Date: Sun, 22 Oct 2017 19:19:45 +0800 [thread overview] Message-ID: <59EC7ED1.2000907@intel.com> (raw) In-Reply-To: <20171022061307-mutt-send-email-mst@kernel.org> On 10/22/2017 11:19 AM, Michael S. Tsirkin wrote: > On Fri, Oct 20, 2017 at 07:54:23PM +0800, Wei Wang wrote: >> This patch series intends to summarize the recent contributions made by >> Michael S. Tsirkin, Tetsuo Handa, Michal Hocko etc. via reporting and >> discussing the related deadlock issues on the mailinglist. Please check >> each patch for details. >> >> >From a high-level point of view, this patch series achieves: >> 1) eliminate the deadlock issue fundamentally caused by the inability >> to run leak_balloon and fill_balloon concurrently; > We need to think about this carefully. Is it an issue that > leak can now bypass fill? It seems that we can now > try to leak a page before fill was seen by host, > but I did not look into it deeply. > > I really like my patch for this better at least for > current kernel. I agree we need to work more on 2+3. Yes, we can check more. But from the original intention: (copied from the commit e22504296d) balloon_lock (mutex) : synchronizes the access demand to elements of struct virtio_balloon and its queue operations; This implementation has covered what balloon_lock achieves. We have inflating and deflating decoupled and use a small lock for each vq respectively. I also tested inflating 20G, and before it's done, requested to deflating 20G, all work fine. > >> 2) enable OOM to release more than 256 inflated pages; and > Does just this help enough? How about my patch + 2? > Tetsuo, what do you think? > >> 3) stop inflating when the guest is under severe memory pressure >> (i.e. OOM). > But when do we finally inflate? Question is how does host know it needs > to resend an interrupt, and when should it do it? I think "when to inflate again" should be a policy defined by the orchestration layer software on the host. A reasonable inflating request should be sent to a guest on the condition that this guest has enough free memory to inflate (virtio-balloon memory stats has already supported to report that info). If the policy defines to inflate guest memory without considering whether the guest is even under memory pressure. The mechanism we provide here is to offer no pages to the host in that case. I think this should be reasonable. Best, Wei
WARNING: multiple messages have this Message-ID (diff)
From: Wei Wang <wei.w.wang@intel.com> To: "Michael S. Tsirkin" <mst@redhat.com> Cc: penguin-kernel@I-love.SAKURA.ne.jp, mhocko@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v1 0/3] Virtio-balloon Improvement Date: Sun, 22 Oct 2017 19:19:45 +0800 [thread overview] Message-ID: <59EC7ED1.2000907@intel.com> (raw) In-Reply-To: <20171022061307-mutt-send-email-mst@kernel.org> On 10/22/2017 11:19 AM, Michael S. Tsirkin wrote: > On Fri, Oct 20, 2017 at 07:54:23PM +0800, Wei Wang wrote: >> This patch series intends to summarize the recent contributions made by >> Michael S. Tsirkin, Tetsuo Handa, Michal Hocko etc. via reporting and >> discussing the related deadlock issues on the mailinglist. Please check >> each patch for details. >> >> >From a high-level point of view, this patch series achieves: >> 1) eliminate the deadlock issue fundamentally caused by the inability >> to run leak_balloon and fill_balloon concurrently; > We need to think about this carefully. Is it an issue that > leak can now bypass fill? It seems that we can now > try to leak a page before fill was seen by host, > but I did not look into it deeply. > > I really like my patch for this better at least for > current kernel. I agree we need to work more on 2+3. Yes, we can check more. But from the original intention: (copied from the commit e22504296d) balloon_lock (mutex) : synchronizes the access demand to elements of struct virtio_balloon and its queue operations; This implementation has covered what balloon_lock achieves. We have inflating and deflating decoupled and use a small lock for each vq respectively. I also tested inflating 20G, and before it's done, requested to deflating 20G, all work fine. > >> 2) enable OOM to release more than 256 inflated pages; and > Does just this help enough? How about my patch + 2? > Tetsuo, what do you think? > >> 3) stop inflating when the guest is under severe memory pressure >> (i.e. OOM). > But when do we finally inflate? Question is how does host know it needs > to resend an interrupt, and when should it do it? I think "when to inflate again" should be a policy defined by the orchestration layer software on the host. A reasonable inflating request should be sent to a guest on the condition that this guest has enough free memory to inflate (virtio-balloon memory stats has already supported to report that info). If the policy defines to inflate guest memory without considering whether the guest is even under memory pressure. The mechanism we provide here is to offer no pages to the host in that case. I think this should be reasonable. 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:17 UTC|newest] Thread overview: 48+ 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 ` Wei Wang 2017-10-20 11:54 ` [PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock Wei Wang 2017-10-20 11:54 ` Wei Wang 2017-10-22 5:20 ` Tetsuo Handa 2017-10-22 5:20 ` Tetsuo Handa 2017-10-22 5:20 ` Tetsuo Handa 2017-10-22 11:24 ` Wei Wang 2017-10-22 11:24 ` Wei Wang 2017-10-22 11:24 ` Wei Wang 2017-10-22 11:50 ` Tetsuo Handa 2017-10-22 11:50 ` Tetsuo Handa 2017-10-24 1:46 ` Wei Wang 2017-10-24 1:46 ` Wei Wang 2017-10-24 1:46 ` Wei Wang 2017-10-22 11:50 ` Tetsuo Handa 2017-10-20 11:54 ` Wei Wang 2017-10-20 11:54 ` [PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM Wei Wang 2017-10-20 11:54 ` Wei Wang 2017-10-20 11:54 ` Wei Wang 2017-10-22 3:21 ` Michael S. Tsirkin 2017-10-22 3:21 ` Michael S. Tsirkin 2017-10-22 3:21 ` Michael S. Tsirkin 2017-10-22 4:11 ` Tetsuo Handa 2017-10-22 4:11 ` Tetsuo Handa 2017-10-22 4:11 ` Tetsuo Handa 2017-10-22 11:31 ` Wei Wang 2017-10-22 11:31 ` Wei Wang 2017-10-22 11:31 ` Wei Wang 2017-10-20 11:54 ` [PATCH v1 3/3] virtio-balloon: stop inflating when OOM occurs Wei Wang 2017-10-20 11:54 ` Wei Wang 2017-10-22 17:13 ` Michael S. Tsirkin 2017-10-22 17:13 ` Michael S. Tsirkin 2017-10-22 17:13 ` Michael S. Tsirkin 2017-10-24 1:58 ` Wei Wang 2017-10-24 1:58 ` Wei Wang 2017-10-24 1:58 ` Wei Wang 2017-10-20 11:54 ` Wei Wang 2017-10-22 3:19 ` [PATCH v1 0/3] Virtio-balloon Improvement Michael S. Tsirkin 2017-10-22 3:19 ` Michael S. Tsirkin 2017-10-22 3:19 ` Michael S. Tsirkin 2017-10-22 11:19 ` Wei Wang [this message] 2017-10-22 11:19 ` Wei Wang 2017-10-22 11:19 ` Wei Wang 2017-11-03 8:35 ` Wei Wang 2017-11-03 8:35 ` Wei Wang 2017-11-03 8:35 ` Wei Wang 2017-10-20 11:54 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=59EC7ED1.2000907@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.