From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrYqX-0004Vz-Bz for qemu-devel@nongnu.org; Wed, 08 Apr 2009 10:33:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrYqS-0004U7-Kt for qemu-devel@nongnu.org; Wed, 08 Apr 2009 10:33:45 -0400 Received: from [199.232.76.173] (port=50466 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrYqS-0004U0-FO for qemu-devel@nongnu.org; Wed, 08 Apr 2009 10:33:40 -0400 Received: from mx1.redhat.com ([66.187.233.31]:35537) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrYqR-00070N-S7 for qemu-devel@nongnu.org; Wed, 08 Apr 2009 10:33:40 -0400 Date: Wed, 8 Apr 2009 15:33:35 +0100 From: "Daniel P. Berrange" Message-ID: <20090408143335.GS18076@redhat.com> References: <1239200204-4934-1-git-send-email-aliguori@us.ibm.com> <1239200204-4934-2-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1239200204-4934-2-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] Re: [PATCH 2/3] Introduce monitor 'wait' command Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: libvir-list@redhat.com, Jan Kiszka , qemu-devel@nongnu.org, Hollis Blanchard 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) 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 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 :|