linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Wei Wang <wei.w.wang@intel.com>,
	virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,
	qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
	kvm@vger.kernel.org, linux-mm@kvack.org, david@redhat.com,
	dave.hansen@intel.com, cornelia.huck@de.ibm.com,
	akpm@linux-foundation.org, mgorman@techsingularity.net,
	aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com,
	liliang.opensource@gmail.com
Subject: Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
Date: Fri, 14 Apr 2017 17:22:43 +0300	[thread overview]
Message-ID: <20170414171452-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20170414094740.GN784@bombadil.infradead.org>

On Fri, Apr 14, 2017 at 02:47:40AM -0700, Matthew Wilcox wrote:
> On Fri, Apr 14, 2017 at 04:50:48AM +0300, Michael S. Tsirkin wrote:
> > On Thu, Apr 13, 2017 at 01:44:11PM -0700, Matthew Wilcox wrote:
> > > On Thu, Apr 13, 2017 at 05:35:03PM +0800, Wei Wang wrote:
> > > > 2) transfer the guest unused pages to the host so that they
> > > > can be skipped to migrate in live migration.
> > > 
> > > I don't understand this second bit.  You leave the pages on the free list,
> > > and tell the host they're free.  What's preventing somebody else from
> > > allocating them and using them for something?  Is the guest semi-frozen
> > > at this point with just enough of it running to ask the balloon driver
> > > to do things?
> > 
> > There's missing documentation here.
> > 
> > The way things actually work is host sends to guest
> > a request for unused pages and then write-protects all memory.
> 
> ... hopefully you mean "write protects all memory, then sends a request
> for unused pages", otherwise there's a race condition.

Exactly.

> And I see the utility of this, but does this functionality belong in
> the balloon driver?

We have historically put all kind of memory-related functionality in the
balloon device. Consider for example memory statistics - seems related
conceptually. See patches 1-2: the new mechanism for reporting lists of
pages seems to be benefitial for both which seems to indicate using the
balloon for this is a good idea.

> It seems like it's something you might want even if you don't have the
> balloon driver loaded.  Or something you might not want if you do have
> the balloon driver loaded.

Most of balloon functionality is kind of loosely coupled.  Yes we could
split it up but I'm not sure what would this buy us. What do you have
in mind?

-- 
MST

--
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>

      reply	other threads:[~2017-04-14 14:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  9:35 Wei Wang
2017-04-13  9:35 ` [PATCH v9 1/5] virtio-balloon: deflate via a page list Wei Wang
2017-04-13  9:35 ` [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Wei Wang
2017-04-13 16:34   ` Michael S. Tsirkin
2017-04-13 17:03     ` Matthew Wilcox
2017-04-14  8:37     ` [virtio-dev] " Wei Wang
2017-04-14 21:38       ` Michael S. Tsirkin
2017-04-17  3:35         ` Wei Wang
2017-04-26 11:03           ` Wang, Wei W
2017-04-26 23:20             ` Michael S. Tsirkin
2017-04-27  6:31               ` Wei Wang
2017-05-05 22:25                 ` Michael S. Tsirkin
2017-05-07  4:19                   ` Wang, Wei W
2017-05-08 17:40                     ` Michael S. Tsirkin
2017-05-09  2:45                       ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 3/5] mm: function to offer a page block on the free list Wei Wang
2017-04-13 20:02   ` Andrew Morton
2017-04-14  2:30     ` Wei Wang
2017-04-14  2:58       ` Matthew Wilcox
2017-04-14  8:58         ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 4/5] mm: export symbol of next_zone and first_online_pgdat Wei Wang
2017-04-13  9:35 ` [PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ Wei Wang
2017-04-13 17:08   ` Michael S. Tsirkin
2017-04-27  6:33     ` Wei Wang
2017-05-05 22:21       ` Michael S. Tsirkin
2017-05-07  4:20         ` Wang, Wei W
2017-04-13 20:44 ` [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Matthew Wilcox
2017-04-14  1:50   ` Michael S. Tsirkin
2017-04-14  2:28     ` Wei Wang
2017-04-14  2:57       ` Michael S. Tsirkin
2017-04-14  9:47     ` Matthew Wilcox
2017-04-14 14:22       ` Michael S. Tsirkin [this message]

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=20170414171452-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.shah@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liliang.opensource@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wei.w.wang@intel.com \
    --cc=willy@infradead.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