From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Np98U-0000rD-Ku for qemu-devel@nongnu.org; Tue, 09 Mar 2010 18:46:50 -0500 Received: from [199.232.76.173] (port=41913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Np98T-0000qU-B2 for qemu-devel@nongnu.org; Tue, 09 Mar 2010 18:46:49 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Np98R-0001N7-JO for qemu-devel@nongnu.org; Tue, 09 Mar 2010 18:46:49 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:55885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Np98R-0001Mz-8h for qemu-devel@nongnu.org; Tue, 09 Mar 2010 18:46:47 -0500 Received: by gyh4 with SMTP id 4so3604468gyh.4 for ; Tue, 09 Mar 2010 15:46:46 -0800 (PST) Message-ID: <4B96DDE1.7040703@codemonkey.ws> Date: Tue, 09 Mar 2010 17:46:41 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/3]: BLOCK_WATERMARK QMP event References: <1268175216-3600-1-git-send-email-lcapitulino@redhat.com> <4B96D4F1.80405@codemonkey.ws> <20100309202203.37faa8fa@redhat.com> In-Reply-To: <20100309202203.37faa8fa@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, uril@redhat.com, qemu-devel@nongnu.org On 03/09/2010 05:22 PM, Luiz Capitulino wrote: > On Tue, 09 Mar 2010 17:08:33 -0600 > Anthony Liguori wrote: > > >> On 03/09/2010 04:53 PM, Luiz Capitulino wrote: >> >>> Hi, >>> >>> This series is based on a previous series submitted by Uri Lublin: >>> >>> http://lists.gnu.org/archive/html/qemu-devel/2009-03/msg00864.html >>> >>> Details on the patches, except for this question: does it make sense to have >>> a 'low' watermark for block devices? >>> >>> I think it doesn't, then the event (and the monitor accompanying command) >>> should be called BLOCK_HIGH_WATERMARK. But this makes the event very >>> unflexible, so I have called it BLOCK_WATERMARK and added parameters for the >>> high/low watermark type. >>> >>> >> The alternative way to implement this is for a management tool to just >> poll the allocated disk size periodically. >> >> It's no more/less safe than generating an event on a "watermark" because >> the event is still racy with respect to a guest that's writing very >> quickly to the disk. >> > The argument against polling is not only about possible races, but > it's something very inefficient to do as the condition you're polling > for may never happen but you're wasting cpu resources for it. > No, you just move the polling into qemu in the block I/O path. It's now "polling" for whether a watermark has been hit. The problem with this functionality is that it's extremely tied to a very specific management policy. It's not at all generic. Polling is an entirely legitimate thing for a management tool to do and we shouldn't introduce events that don't make sense just to avoid polling. Regards, Anthony Liguori