From: Anthony Liguori <aliguori@us.ibm.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: libvir-list@redhat.com, Jan Kiszka <jan.kiszka@web.de>,
qemu-devel@nongnu.org, Hollis Blanchard <hollisb@us.ibm.com>
Subject: [Qemu-devel] Re: [PATCH 2/3] Introduce monitor 'wait' command
Date: Wed, 08 Apr 2009 09:39:44 -0500 [thread overview]
Message-ID: <49DCB730.4030907@us.ibm.com> (raw)
In-Reply-To: <20090408143335.GS18076@redhat.com>
Daniel P. Berrange wrote:
> On Wed, Apr 08, 2009 at 09:16:43AM -0500, Anthony Liguori wrote:
>
>> The wait command will pause the monitor the command was issued in until a new
>> event becomes available. Events are queued if there isn't a waiter present.
>> The wait command completes after a single event is available.
>>
>> Today, we queue events indefinitely but in the future, I suspect we'll drop
>> events that are older than a certain amount of time to avoid infinitely
>> allocating memory for long running VMs.
>>
>> To make use of the new notification mechanism, this patch introduces a
>> qemu_notify_event() API. This API takes three parameters: a class which is
>> meant to classify the type of event being generated, a name which is meant to
>> distinguish which event in the class that has been generated, and a details
>> parameters which is meant to allow events to send arbitrary data with a given
>> event.
>>
>
> Perhaps we should have the ability to turn on/off events, via a 'notify EVENT'
> command, and a way turn off the prompt on the channel used for receiving
> events.
>
> So if I was interested in RTC change, and VNC client connection events, on
> the main monitor command channel we'd do:
>
> (qemu) notify rtc-change
> rtc-change notification enabled
> (qemu) notify vnc-client
> vnc-client notification enabled
> (qemu)
>
So you want to mask out event types? I think you could do this with the
actual wait command either inclusively:
(qemu) wait "rtc-change vnc-client"
...
Or exclusively:
(qemu) wait -x "rtc-change vnc-client"
...
> And then in the 2nd monitor channel, a single 'wait' command would turn
> off the monitor prompt and make the channel dedicated for just events,
> one per line
>
> (qemu) wait
> rtc-change UTC+0100
> vnc-client connect 192.46.12.4:9353
> vnc-client disconnect 192.46.12.4:9353
> vnc-client connect 192.46.12.2:9353
> vnc-client disconnect 192.46.12.2:9353
>
N.B. Right now, wait returns only a single event. This is because the
output format is:
(qemu) wait
1239200822.748241: vm-state: stop
(qemu)
But vm-state doesn't have any details, if it had details it would be:
(qemu) wait
1239200822.748241: vm-state: stop
The virtual machine has stopped.
(qemu)
Since everyone already parses commands like this, I think the format
makes sense. It implies that the event dispatch code has to sit
constantly issuing wait commands.
In my next version of the patch, I expire old events (older than 10
minutes), and also add a -d flag to poll for events vs. wait.
Regards,
Anthony Liguori
> Daniel
>
--
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-04-08 14:40 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 [this message]
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
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=49DCB730.4030907@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=berrange@redhat.com \
--cc=hollisb@us.ibm.com \
--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 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.