From: "Daniel P. Berrange" <berrange@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
Avi Kivity <avi@redhat.com>, Chris Wright <chrisw@redhat.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: KVM call agenda for Apr 27
Date: Tue, 27 Apr 2010 14:38:17 +0100 [thread overview]
Message-ID: <20100427133817.GJ3681@redhat.com> (raw)
In-Reply-To: <20100427131554.GJ10044@redhat.com>
On Tue, Apr 27, 2010 at 04:15:54PM +0300, Gleb Natapov wrote:
> On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote:
> > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote:
> > > On 04/27/2010 03:14 AM, Avi Kivity wrote:
> > > >On 04/27/2010 01:36 AM, Anthony Liguori wrote:
> > > >>
> > > >>A few comments:
> > > >>
> > > >>1) The problem was not block watermark itself but generating a
> > > >>notification on the watermark threshold. It's a heuristic and should
> > > >>be implemented based on polling block stats.
> > > >
> > > >Polling for an event that never happens is bad engineering. What
> > > >frequency do you poll? you're forcing the user to make a lose-lose
> > > >tradeoff.
> > > >
> > > >>Otherwise, we'll be adding tons of events to qemu that we'll struggle
> > > >>to maintain.
> > > >
> > > >That's not a valid reason to reject a user requirement. We may argue
> > > >the requirement is bogus, or that the suggested implementation is
> > > >wrong and point in a different direction, but saying that we may have
> > > >to add more code in the future due to other requirements is ... well I
> > > >can't find a word for it.
> > >
> > > Polling is the best solution because it offers the most flexibility.
> > > Baking the heuristic into qemu just removes flexibility for all consumers.
> >
> > Polling as the added advantage that you can recover better if the
> > app talking to QMP is offline for a period. eg if libvirt were
> > disconnected from QMP at the time the high watermark event were
> > triggered, the next you'll know is a ENOSPACE event. If the app
> > were able to poll on the allocation value, then it could immediately
> > see the watermark had been passed the first time it polled after
> > libvirt reconnected to QMP. As you say its also more flexible because
> > you can invent a usage where you have 2 or 3 watermarks where you
> > could try harder to get more space as you pass each watermark.
> >
> When libvirt reconnects it should poll once and then wait for
> notification. If you want to have several watermarks configure
> first one and after getting notification about it configure
> second one and so on.
So regardless of whether polling or events are 'best', we need to have the
pollable QMP command implemented to get rid of the potential for a missed
event to a watermark threshold that has already past. The same race problem
exists with updating the thresholds on the fly as one is passed.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Chris Wright <chrisw@redhat.com>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>,
kvm@vger.kernel.org
Subject: [Qemu-devel] Re: KVM call agenda for Apr 27
Date: Tue, 27 Apr 2010 14:38:17 +0100 [thread overview]
Message-ID: <20100427133817.GJ3681@redhat.com> (raw)
In-Reply-To: <20100427131554.GJ10044@redhat.com>
On Tue, Apr 27, 2010 at 04:15:54PM +0300, Gleb Natapov wrote:
> On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote:
> > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote:
> > > On 04/27/2010 03:14 AM, Avi Kivity wrote:
> > > >On 04/27/2010 01:36 AM, Anthony Liguori wrote:
> > > >>
> > > >>A few comments:
> > > >>
> > > >>1) The problem was not block watermark itself but generating a
> > > >>notification on the watermark threshold. It's a heuristic and should
> > > >>be implemented based on polling block stats.
> > > >
> > > >Polling for an event that never happens is bad engineering. What
> > > >frequency do you poll? you're forcing the user to make a lose-lose
> > > >tradeoff.
> > > >
> > > >>Otherwise, we'll be adding tons of events to qemu that we'll struggle
> > > >>to maintain.
> > > >
> > > >That's not a valid reason to reject a user requirement. We may argue
> > > >the requirement is bogus, or that the suggested implementation is
> > > >wrong and point in a different direction, but saying that we may have
> > > >to add more code in the future due to other requirements is ... well I
> > > >can't find a word for it.
> > >
> > > Polling is the best solution because it offers the most flexibility.
> > > Baking the heuristic into qemu just removes flexibility for all consumers.
> >
> > Polling as the added advantage that you can recover better if the
> > app talking to QMP is offline for a period. eg if libvirt were
> > disconnected from QMP at the time the high watermark event were
> > triggered, the next you'll know is a ENOSPACE event. If the app
> > were able to poll on the allocation value, then it could immediately
> > see the watermark had been passed the first time it polled after
> > libvirt reconnected to QMP. As you say its also more flexible because
> > you can invent a usage where you have 2 or 3 watermarks where you
> > could try harder to get more space as you pass each watermark.
> >
> When libvirt reconnects it should poll once and then wait for
> notification. If you want to have several watermarks configure
> first one and after getting notification about it configure
> second one and so on.
So regardless of whether polling or events are 'best', we need to have the
pollable QMP command implemented to get rid of the potential for a missed
event to a watermark threshold that has already past. The same race problem
exists with updating the thresholds on the fly as one is passed.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
next prev parent reply other threads:[~2010-04-27 13:38 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 17:26 KVM call agenda for Apr 27 Chris Wright
2010-04-26 17:26 ` [Qemu-devel] " Chris Wright
2010-04-26 17:51 ` Anthony Liguori
2010-04-26 17:51 ` [Qemu-devel] " Anthony Liguori
2010-04-26 22:12 ` Chris Wright
2010-04-26 22:12 ` [Qemu-devel] " Chris Wright
2010-04-26 22:36 ` Anthony Liguori
2010-04-26 22:36 ` [Qemu-devel] " Anthony Liguori
2010-04-27 8:14 ` Avi Kivity
2010-04-27 8:14 ` [Qemu-devel] " Avi Kivity
2010-04-27 8:48 ` Dor Laor
2010-04-27 8:48 ` [Qemu-devel] " Dor Laor
2010-04-27 8:56 ` Avi Kivity
2010-04-27 8:56 ` [Qemu-devel] " Avi Kivity
2010-04-27 9:08 ` Dor Laor
2010-04-27 9:08 ` [Qemu-devel] " Dor Laor
2010-04-27 9:22 ` Avi Kivity
2010-04-27 9:22 ` [Qemu-devel] " Avi Kivity
2010-04-27 9:32 ` Dor Laor
2010-04-27 9:32 ` [Qemu-devel] " Dor Laor
2010-04-27 9:41 ` Kevin Wolf
2010-04-27 9:41 ` [Qemu-devel] " Kevin Wolf
2010-04-27 13:15 ` Anthony Liguori
2010-04-27 13:15 ` [Qemu-devel] " Anthony Liguori
2010-04-27 9:16 ` Kevin Wolf
2010-04-27 9:16 ` [Qemu-devel] " Kevin Wolf
2010-04-27 9:28 ` Avi Kivity
2010-04-27 9:28 ` [Qemu-devel] " Avi Kivity
2010-04-27 13:03 ` Anthony Liguori
2010-04-27 13:03 ` [Qemu-devel] " Anthony Liguori
2010-04-27 13:08 ` Avi Kivity
2010-04-27 13:08 ` [Qemu-devel] " Avi Kivity
2010-04-27 13:11 ` Daniel P. Berrange
2010-04-27 13:11 ` [Qemu-devel] " Daniel P. Berrange
2010-04-27 13:15 ` Gleb Natapov
2010-04-27 13:15 ` [Qemu-devel] " Gleb Natapov
2010-04-27 13:38 ` Daniel P. Berrange [this message]
2010-04-27 13:38 ` Daniel P. Berrange
2010-04-27 14:10 ` Gleb Natapov
2010-04-27 14:10 ` [Qemu-devel] " Gleb Natapov
2010-04-27 8:53 ` Kevin Wolf
2010-04-27 13:10 ` Anthony Liguori
2010-04-27 13:18 ` Kevin Wolf
2010-04-27 13:21 ` Anthony Liguori
2010-04-27 13:42 ` Kevin Wolf
2010-04-27 13:48 ` Anthony Liguori
2010-04-27 13:58 ` Kevin Wolf
2010-04-27 14:01 ` Anthony Liguori
2010-04-27 11:11 ` Gleb Natapov
2010-04-27 11:11 ` [Qemu-devel] " Gleb Natapov
2010-04-27 13:00 ` Anthony Liguori
2010-04-27 13:00 ` [Qemu-devel] " Anthony Liguori
2010-04-27 13:05 ` Gleb Natapov
2010-04-27 13:05 ` [Qemu-devel] " Gleb Natapov
2010-04-27 13:19 ` Anthony Liguori
2010-04-27 13:19 ` [Qemu-devel] " Anthony Liguori
2010-04-27 13:29 ` Gleb Natapov
2010-04-27 13:29 ` [Qemu-devel] " Gleb Natapov
2010-04-27 1:15 ` Luiz Capitulino
2010-04-27 1:15 ` Luiz Capitulino
2010-04-27 3:39 ` Aurelien Jarno
2010-04-27 3:39 ` Aurelien Jarno
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=20100427133817.GJ3681@redhat.com \
--to=berrange@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=chrisw@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.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 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.