From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTIS6-0004Qs-7M for qemu-devel@nongnu.org; Fri, 08 Jan 2010 12:16:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTIS1-0004M8-5W for qemu-devel@nongnu.org; Fri, 08 Jan 2010 12:16:45 -0500 Received: from [199.232.76.173] (port=39610 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTIS0-0004Lf-RP for qemu-devel@nongnu.org; Fri, 08 Jan 2010 12:16:40 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:46584) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTIS0-00031w-E4 for qemu-devel@nongnu.org; Fri, 08 Jan 2010 12:16:40 -0500 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e39.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o08H9Ntd022933 for ; Fri, 8 Jan 2010 10:09:23 -0700 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id o08H6I4m225958 for ; Fri, 8 Jan 2010 10:16:21 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o08H1XmM031780 for ; Fri, 8 Jan 2010 10:01:33 -0700 Subject: Re: [Qemu-devel] Re: [RFD] virtio: Add memory statistics reporting to the balloon driver From: Adam Litke In-Reply-To: <20100107163014.47662b8c@doriath> References: <1262711318.10698.104.camel@aglitke> <4B45F9CA.7050903@codemonkey.ws> <20100107154918.GB19168@redhat.com> <1262881658.2767.12.camel@aglitke> <4B460E55.9090800@redhat.com> <4B461233.2020808@codemonkey.ws> <20100107155830.71fc3f76@doriath> <20100107163014.47662b8c@doriath> Content-Type: text/plain; charset="UTF-8" Date: Fri, 08 Jan 2010 11:01:31 -0600 Message-ID: <1262970091.2767.22.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Avi Kivity , qemu-devel On Thu, 2010-01-07 at 16:30 -0200, Luiz Capitulino wrote: > On Thu, 7 Jan 2010 15:58:30 -0200 > Luiz Capitulino wrote: > > > I like Daniel's idea too. In practice 'refresh-balloon' is going to > > be Anthony's idea #1 for the QMP case, which seems the right way to > > do it with QMP. > > Hm, something that has just occurred to me: it's easy to have > async messages in the user Monitor, we could add a new type of > user print callback called async_print. > > This new callback would be called by the Monitor when the async > message API is called but we are in user mode. > > This is really today's user_print, but user data is printed > asynchronously. There is one thing I am struggling with as I try to implement this asynchronous behavior. How can I suspend the monitor thread to wait for the stats update to come through? I see qemu_cond_timedwait(), but that appears to only be used for a VM's cpu threads. I also see the bottom half infrastructure, but I am not sure if that is appropriate either. Any pointers would be greatly appreciated. -- Thanks, Adam