From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6kSA-0006Kt-Kq for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:03:54 -0400 Received: from [140.186.70.92] (port=35530 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6kS6-0006IE-91 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6kS3-0007oy-0L for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:03:49 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:46378) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6kS2-0007oq-Nk for qemu-devel@nongnu.org; Tue, 27 Apr 2010 09:03:46 -0400 Received: by pwi6 with SMTP id 6so8478534pwi.4 for ; Tue, 27 Apr 2010 06:03:45 -0700 (PDT) Message-ID: <4BD6E0AE.8020307@codemonkey.ws> Date: Tue, 27 Apr 2010 08:03:42 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20100426172634.GC15278@x200.localdomain> <4BD5D28C.7080700@codemonkey.ws> <20100426221258.GH15278@x200.localdomain> <4BD61584.9080208@codemonkey.ws> <4BD69D03.2050502@redhat.com> In-Reply-To: <4BD69D03.2050502@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Avi Kivity Cc: Chris Wright , qemu-devel@nongnu.org, kvm@vger.kernel.org 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. >> >> 2) A block plugin doesn't solve the problem if it's just at the >> BlockDriverState level because it can't interact with qcow2. > > Why not? We have a layered model. guest -> qcow2 -> plugin (sends > event) -> raw-posix. Just need to insert the plugin at the > appropriate layer. All of the qcow2 information is static to the qcow2 driver and I don't think changing that for plugins is a good idea. >> >> 3) For general block plugins, it's probably better to tackle >> userspace block devices. We have CUSE and FUSE already, a BUSE is a >> logical conclusion. > > We also have an nbd client. > > Here's another option: an nbd-like protocol that remotes all > BlockDriver operations except read and write over a unix domain > socket. The open operation returns an fd (SCM_RIGHTS strikes again) > that is used for read and write. This can be used to implement > snapshots over LVM, for example. How does it address the watermark problem? Regards, Anthony Liguori