kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	riel@redhat.com, aarcange@redhat.com, aquini@redhat.com,
	mst@redhat.com, vdavydov@parallels.com, amit.shah@redhat.com,
	dfediuck@redhat.com, alitke@redhat.com,
	"Daniel Kiper" <dkiper@net-space.pl>
Subject: Re: [RFC PATCH 3/4] virtio_balloon: add pressure notification via a new virtqueue
Date: Mon, 20 Jan 2014 12:43:45 +1030	[thread overview]
Message-ID: <8761pftn6u.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20140116203819.0e7be6d4@redhat.com>

Luiz Capitulino <lcapitulino@redhat.com> writes:
> On Fri, 17 Jan 2014 09:10:47 +1030
> Rusty Russell <rusty@rustcorp.com.au> wrote:
>
>> Luiz Capitulino <lcapitulino@redhat.com> writes:
>> > From: Luiz capitulino <lcapitulino@redhat.com>
>> >
>> > This commit adds support to a new virtqueue called message virtqueue.
>> 
>> OK, this needs a lot of thought (especially since reworking the virtio
>> balloon is on the TODO list for the OASIS virtio technical committee...)
>> 
>> But AFAICT this is a way of explicitly saying "no" to the host's target
>> (vs the implicit method of just not meeting the target).  I'm not sure
>> that gives enough information to the host.  On the other hand, I'm not
>> sure what information we *can* give.
>> 
>> Should we instead be counter-proposing a target?
>
> The problem is how to estimate a target value. I found it simpler
> to just try to obey what the host is asking for (and fail if not
> possible) than trying to make the guest negotiate with the host.

Understood, but we already do this the other way where the host tells
the guest how much memory to give up.

And is a guest expected to automatically inflate the balloon even if the
host doesn't want the memory, or wait to be asked?

> >> What does qemu do with this information?
> >
> > There are two possible scenarios:
> >
> >  1. The balloon driver is currently inflating when it gets under
> >     pressure
> >
> >     QEMU resets "num_pages" to the current balloon size. This
> >     cancels the on-going inflate
> >
> >  2. The balloon driver is not inflating, eg. it's possibly sleeping
> >
> >    QEMU issues a deflate
> >
> > But note that those scenarios are not supposed to be used with the
> > current device, they are part of the automatic ballooning feature.
> > I CC'ed you on the QEMU patch, you can find it here case you didn't
> > see it:
> >
> >  http://marc.info/?l=kvm&m=138988966315690&w=2

Yes, caught that after I replied; I should have checked first.

It seems like we are still figuring out how to do ballooning.  The
best approach in cases like this is to make it simple, so I don't hate
this.

But note that Daniel Kiper and I have been discussing a new virtio
balloon for draft 2 of the standard.  I'll CC you when I post that to
one of the OASIS virtio mailing lists.

Cheers,
Rusty.

  parent reply	other threads:[~2014-01-20  2:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 16:24 [RFC PATCH 0/4] virtio_balloon: add pressure notification via a new virtqueue Luiz Capitulino
2014-01-16 16:24 ` [RFC PATCH 1/4] vmpressure: in-kernel notifications Luiz Capitulino
2014-01-16 16:24 ` [RFC PATCH 2/4] vmpressure in-kernel: hack Luiz Capitulino
2014-01-16 16:24 ` [RFC PATCH 3/4] virtio_balloon: add pressure notification via a new virtqueue Luiz Capitulino
2014-01-16 22:40   ` Rusty Russell
2014-01-17  1:38     ` Luiz Capitulino
2014-01-17  1:43       ` Luiz Capitulino
2014-01-20  2:13       ` Rusty Russell [this message]
2014-01-20 14:59         ` Luiz Capitulino
2014-01-16 16:24 ` [RFC PATCH 4/4] virtio_balloon: skip inflation if guest is under pressure Luiz Capitulino

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=8761pftn6u.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=aarcange@redhat.com \
    --cc=alitke@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=aquini@redhat.com \
    --cc=dfediuck@redhat.com \
    --cc=dkiper@net-space.pl \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=riel@redhat.com \
    --cc=vdavydov@parallels.com \
    /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;
as well as URLs for NNTP newsgroup(s).