From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: KVM call agenda for Apr 27 Date: Tue, 27 Apr 2010 11:48:10 +0300 Message-ID: <4BD6A4CA.6070306@redhat.com> References: <20100426172634.GC15278@x200.localdomain> <4BD5D28C.7080700@codemonkey.ws> <20100426221258.GH15278@x200.localdomain> <4BD61584.9080208@codemonkey.ws> <4BD69D03.2050502@redhat.com> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Chris Wright , kvm@vger.kernel.org, qemu-devel@nongnu.org, Kevin Wolf To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63288 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306Ab0D0Iqp (ORCPT ); Tue, 27 Apr 2010 04:46:45 -0400 In-Reply-To: <4BD69D03.2050502@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/27/2010 11: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. > >> >> 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. > >> >> 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. > Why w/o read/writes? the watermark code needs them too (as info, not the actual buffer). IMHO the whole thing is way over engineered: a) Having another channel into qemu is complicating management software. Isn't the monitor should be the channel? Otherwise we'll need to create another QMP (or nbd like Avi suggest) for these actions. It's extra work for mgmt and they will have hard time to understand events interleaving of the various channels b) How the plugins are defined? Is it scripts? Binaries? Do they open their own sockets? So I suggest either to stick with qmp or to have new block layer but let qmp pass events from it - this is actually the nbd-like approach but with qmp socket. Thanks, Dor