From: "Daniel P. Berrange" <berrange@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: libvir-list@redhat.com, Jan Kiszka <jan.kiszka@web.de>,
qemu-devel@nongnu.org, Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command
Date: Thu, 9 Apr 2009 10:55:11 +0100 [thread overview]
Message-ID: <20090409095511.GE18054@redhat.com> (raw)
In-Reply-To: <20090408190611.GC10947@shareable.org>
On Wed, Apr 08, 2009 at 08:06:11PM +0100, Jamie Lokier wrote:
> Anthony Liguori wrote:
> > It doesn't. When an app enables events, we would start queuing them,
> > but if it didn't consume them in a timely manner (or at all), we would
> > start leaking memory badly.
> >
> > We want to be robust even in the face of poorly written management
> > apps/scripts so we need some expiration function too.
>
> What happens when an app stops reading the monitor channel for a
> little while, and there's enough monitor output to fill TCP buffers or
> terminal buffers? Does it block QEMU? Does QEMU drop arbitrary bytes
> from the stream, corrupting the output syntax?
One scheme would be to have a small buffer - enough to store say 10 events.
If the monitor is blocking for write, and the buffer is full then start to
discard all further events. When the buffer has more space again, then
send an explicit 'overflow' event informing the app that stuff has been
dropped from the event queue.
In normal circumstances the app would never see this message, but if there
was some unexpected problem causing the app to not process events quickly
enough, then at least it would be able to then detect that qemu has
discarded alot of events, and re-synchronize its state by running appropriate
'info' commands.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.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:[~2009-04-09 9:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 14:16 [Qemu-devel] [PATCH 1/3] Allow multiple monitor devices Anthony Liguori
2009-04-08 14:16 ` [Qemu-devel] [PATCH 2/3] Introduce monitor 'wait' command Anthony Liguori
2009-04-08 14:33 ` [Qemu-devel] " Daniel P. Berrange
2009-04-08 14:39 ` Anthony Liguori
2009-04-08 15:03 ` [Qemu-devel] Re: [libvirt] " Gerd Hoffmann
2009-04-08 15:25 ` Jan Kiszka
2009-04-08 17:44 ` Anthony Liguori
2009-04-08 19:06 ` Jamie Lokier
2009-04-08 19:35 ` Anthony Liguori
2009-04-08 20:28 ` Hollis Blanchard
2009-04-08 21:14 ` Anthony Liguori
2009-04-08 21:31 ` Hollis Blanchard
2009-04-09 13:59 ` Anthony Liguori
2009-04-08 21:39 ` Paul Brook
2009-04-09 8:24 ` Avi Kivity
2009-04-09 13:56 ` Anthony Liguori
2009-04-09 17:12 ` Jamie Lokier
2009-04-08 21:27 ` Zachary Amsden
2009-04-09 9:55 ` Daniel P. Berrange [this message]
2009-04-09 17:13 ` Jamie Lokier
2009-04-09 9:44 ` Gerd Hoffmann
2009-04-09 13:31 ` Anthony Liguori
2009-04-08 14:16 ` [Qemu-devel] [PATCH 3/3] Implement vm-state notifications Anthony Liguori
2009-04-08 14:27 ` [Qemu-devel] Re: [PATCH 1/3] Allow multiple monitor devices Jan Kiszka
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=20090409095511.GE18054@redhat.com \
--to=berrange@redhat.com \
--cc=hollisb@us.ibm.com \
--cc=jamie@shareable.org \
--cc=jan.kiszka@web.de \
--cc=libvir-list@redhat.com \
--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 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).