From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
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] [PATCH 1/6] Allow multiple monitor devices (v2)
Date: Thu, 09 Apr 2009 18:11:37 +0300 [thread overview]
Message-ID: <49DE1029.3030909@redhat.com> (raw)
In-Reply-To: <49DE0CF2.3060307@us.ibm.com>
Anthony Liguori wrote:
> Avi Kivity wrote:
>>
>> I'd make everything line-oriented. Anything from the user up to \n
>> is buffered and ignored until the \n arrives.
>>
>> Once the \n arrives, the command is acted upon atomically, either
>> completing fully or launching an async notification.
>>
>> So the rules are: whenever the monitor is idle, a notification can be
>> printed out.
>
> So by idle, you mean, the end of the output buffer ends in either '\n'
> or '\n(qemu) '. The input buffer must also be empty.
You don't have to look any buffers. If the monitor is processing a
command, it is busy. An asynchronous command ('migrate -d') is not
processed in the monitor after it is launched, so it doesn't keep the
monitor busy. A monitor enters idle after printing the prompt, and
leaves idle when it starts processing a command.
If you meant from the user side, a notification always follows the prompt.
>
>> (qemu) notify enospace on
>> (qemu) notify vnc-connect on
>> (qemu)
>> notification: vnc connection ...
>> (qemu) notify migration-completion on
>> (qemu) migrate -d ...
>> notification: enospc on ide0-0
>> (qemu) migrate_cancel
>> notification: migration cancelled
>> (qemu) migrate -d ...
>> (qemu)
>> notification: migration completed
>
> This hurts my eyes. It's not human readable.
I'm sorry, I don't see why. It's just like a shell session.
Compare with:
Monitor 1:
(qemu) notify enospace on
(qemu) notify vnc-connect on
(qemu) notify migration-completion on
(qemu) migrate -d ...
(qemu) migrate_cancel
(qemu) migrate -d ...
Monitor 2:
(qemu) wait
vnc connection ...
(qemu) wait
enospc on ide0-0
(qemu) wait
migration cancelled
(qemu) wait
notification: migration completed
There is no way to tell by looking what has happened (well, in this case
you can, but in the general case you cannot). You have to look at two
separate interactive sessions (ctrl-alt-2 ctrl-alt-3 ctrl-alt-3). You
have to keep reissuing the wait command. Oh, and it's racy, so if
you're interested in what really happens you have to issue info commands
on session 1.
That's unusable.
> If we're going to do this, we might as well have a non-human mode
> which would oddly enough be more human readable. If you do this, then
> your session looks an awful lot like my session from a previous note.
I think we should.
>
> I think the thing that is missing is that the 'wait' command does not
> have to be part of the non-human mode. In non-human mode, you are
> always doing an implicit wait.
>
I think 'wait' is unusable for humans. If I want qemu to tell me
something happened, it's enough to enable notifications. There's no
need to tell it to wait every time something happens. That's poll(2),
there's no poll(1).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2009-04-09 15:11 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 18:34 [Qemu-devel] [PATCH 1/6] Allow multiple monitor devices (v2) Anthony Liguori
2009-04-08 18:34 ` [Qemu-devel] [PATCH 2/6] Introduce monitor 'wait' command (v2) Anthony Liguori
2009-04-08 18:34 ` [Qemu-devel] [PATCH 3/6] Introduce wait filtering (v2) Anthony Liguori
2009-04-08 18:35 ` [Qemu-devel] [PATCH 4/6] Document new events (v2) Anthony Liguori
2009-04-08 18:35 ` [Qemu-devel] [PATCH 5/6] Implement vm-state notifications (v2) Anthony Liguori
2009-04-08 18:35 ` [Qemu-devel] [PATCH 6/6] Implement vnc-event " Anthony Liguori
2009-04-08 18:43 ` [Qemu-devel] Re: [PATCH 2/6] Introduce monitor 'wait' command (v2) Anthony Liguori
2009-04-08 19:01 ` [Qemu-devel] " Blue Swirl
2009-04-08 19:02 ` Anthony Liguori
2009-04-09 11:01 ` Avi Kivity
2009-04-09 13:40 ` Anthony Liguori
2009-04-09 13:58 ` Avi Kivity
2009-04-09 14:19 ` Jan Kiszka
2009-04-09 8:19 ` [Qemu-devel] [PATCH 1/6] Allow multiple monitor devices (v2) Avi Kivity
2009-04-09 13:28 ` Anthony Liguori
2009-04-09 13:40 ` Avi Kivity
2009-04-09 13:47 ` Anthony Liguori
2009-04-09 14:03 ` Avi Kivity
2009-04-09 14:13 ` Anthony Liguori
2009-04-09 14:28 ` Avi Kivity
2009-04-09 14:30 ` Anthony Liguori
2009-04-09 14:37 ` Avi Kivity
2009-04-09 14:57 ` Anthony Liguori
2009-04-09 15:11 ` Avi Kivity [this message]
2009-04-09 15:40 ` Anthony Liguori
2009-04-09 15:57 ` Avi Kivity
2009-04-09 16:09 ` Anthony Liguori
2009-04-09 16:30 ` Avi Kivity
2009-04-09 16:42 ` Anthony Liguori
2009-04-09 17:00 ` Avi Kivity
2009-04-09 17:40 ` Anthony Liguori
2009-04-11 16:25 ` Avi Kivity
2009-04-11 20:18 ` Anthony Liguori
2009-04-11 21:14 ` Avi Kivity
2009-04-12 18:42 ` Jamie Lokier
2009-04-14 8:30 ` [libvirt] " Daniel P. Berrange
2009-04-14 9:15 ` Avi Kivity
2009-04-14 9:17 ` Daniel P. Berrange
2009-04-14 9:29 ` Jan Kiszka
2009-04-14 9:36 ` Avi Kivity
2009-04-14 9:38 ` Avi Kivity
2009-04-14 18:21 ` Jamie Lokier
2009-04-14 18:19 ` Jamie Lokier
2009-04-16 9:03 ` Avi Kivity
2009-04-11 23:16 ` Zachary Amsden
2009-04-12 8:23 ` Zachary Amsden
2009-04-14 8:28 ` Gerd Hoffmann
2009-04-14 18:20 ` Jamie Lokier
2009-04-11 19:11 ` Avi Kivity
2009-04-11 21:47 ` Andreas Färber
2009-04-12 18:44 ` Jamie Lokier
2009-04-09 16:01 ` Jamie Lokier
2009-04-09 14:15 ` [libvirt] " Gerd Hoffmann
2009-04-09 14:19 ` Avi Kivity
2009-04-09 14:56 ` Jan Kiszka
2009-04-09 15:15 ` François Revol
2009-04-09 15:15 ` Avi Kivity
2009-04-09 15:49 ` Jan Kiszka
2009-04-09 16:01 ` Avi Kivity
2009-04-09 16:07 ` Jamie Lokier
2009-05-11 20:54 ` Hollis Blanchard
2009-05-11 21:51 ` Anthony Liguori
2009-05-12 8:48 ` Avi Kivity
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=49DE1029.3030909@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.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 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).