From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lrs04-0001aK-4O for qemu-devel@nongnu.org; Thu, 09 Apr 2009 07:00:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lrrzy-0001a0-HT for qemu-devel@nongnu.org; Thu, 09 Apr 2009 07:00:50 -0400 Received: from [199.232.76.173] (port=39892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lrrzy-0001Zx-BK for qemu-devel@nongnu.org; Thu, 09 Apr 2009 07:00:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:58424) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lrrzx-00030z-PB for qemu-devel@nongnu.org; Thu, 09 Apr 2009 07:00:46 -0400 Message-ID: <49DDD57F.7000807@redhat.com> Date: Thu, 09 Apr 2009 14:01:19 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/6] Introduce monitor 'wait' command (v2) References: <1239215702-23818-1-git-send-email-aliguori@us.ibm.com> <1239215702-23818-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1239215702-23818-2-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: libvir-list@redhat.com, Anthony Liguori , Jan Kiszka , Hollis Blanchard 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. > How do you stop a wait if there are no pending events? > 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. > This queueing plug the race where an event happens immediately after a wait completes. But it could be avoided completely by having asynchronous notifications on a single monitor. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.