From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6lUW-0003NZ-DN for qemu-devel@nongnu.org; Tue, 27 Apr 2010 10:10:24 -0400 Received: from [140.186.70.92] (port=35215 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6lUU-0003Kp-2p for qemu-devel@nongnu.org; Tue, 27 Apr 2010 10:10:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6lUS-0003am-Ac for qemu-devel@nongnu.org; Tue, 27 Apr 2010 10:10:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30751) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6lUS-0003aP-20 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 10:10:20 -0400 Date: Tue, 27 Apr 2010 17:10:15 +0300 From: Gleb Natapov Message-ID: <20100427141015.GA22154@redhat.com> References: <20100426172634.GC15278@x200.localdomain> <4BD5D28C.7080700@codemonkey.ws> <20100426221258.GH15278@x200.localdomain> <4BD61584.9080208@codemonkey.ws> <4BD69D03.2050502@redhat.com> <4BD6E0AE.8020307@codemonkey.ws> <20100427131146.GI3681@redhat.com> <20100427131554.GJ10044@redhat.com> <20100427133817.GJ3681@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100427133817.GJ3681@redhat.com> Subject: [Qemu-devel] Re: KVM call agenda for Apr 27 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Chris Wright , qemu-devel@nongnu.org, Avi Kivity , kvm@vger.kernel.org On Tue, Apr 27, 2010 at 02:38:17PM +0100, Daniel P. Berrange wrote: > On Tue, Apr 27, 2010 at 04:15:54PM +0300, Gleb Natapov wrote: > > On Tue, Apr 27, 2010 at 02:11:46PM +0100, Daniel P. Berrange wrote: > > > On Tue, Apr 27, 2010 at 08:03:42AM -0500, Anthony Liguori wrote: > > > > On 04/27/2010 03:14 AM, Avi Kivity wrote: > > > > >On 04/27/2010 01:36 AM, Anthony Liguori wrote: > > > > >> > > > > >>A few comments: > > > > >> > > > > >>1) The problem was not block watermark itself but generating a > > > > >>notification on the watermark threshold. It's a heuristic and should > > > > >>be implemented based on polling block stats. > > > > > > > > > >Polling for an event that never happens is bad engineering. What > > > > >frequency do you poll? you're forcing the user to make a lose-lose > > > > >tradeoff. > > > > > > > > > >>Otherwise, we'll be adding tons of events to qemu that we'll struggle > > > > >>to maintain. > > > > > > > > > >That's not a valid reason to reject a user requirement. We may argue > > > > >the requirement is bogus, or that the suggested implementation is > > > > >wrong and point in a different direction, but saying that we may have > > > > >to add more code in the future due to other requirements is ... well I > > > > >can't find a word for it. > > > > > > > > Polling is the best solution because it offers the most flexibility. > > > > Baking the heuristic into qemu just removes flexibility for all consumers. > > > > > > Polling as the added advantage that you can recover better if the > > > app talking to QMP is offline for a period. eg if libvirt were > > > disconnected from QMP at the time the high watermark event were > > > triggered, the next you'll know is a ENOSPACE event. If the app > > > were able to poll on the allocation value, then it could immediately > > > see the watermark had been passed the first time it polled after > > > libvirt reconnected to QMP. As you say its also more flexible because > > > you can invent a usage where you have 2 or 3 watermarks where you > > > could try harder to get more space as you pass each watermark. > > > > > When libvirt reconnects it should poll once and then wait for > > notification. If you want to have several watermarks configure > > first one and after getting notification about it configure > > second one and so on. > > So regardless of whether polling or events are 'best', we need to have the > pollable QMP command implemented to get rid of the potential for a missed > event to a watermark threshold that has already past. The same race problem > exists with updating the thresholds on the fly as one is passed. > Of course. Polling command is needed in any case. -- Gleb.