From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te5PR-0006gC-BV for qemu-devel@nongnu.org; Thu, 29 Nov 2012 09:48:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te5PL-0002cp-JW for qemu-devel@nongnu.org; Thu, 29 Nov 2012 09:48:13 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:52609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te5PL-0002ce-Cy for qemu-devel@nongnu.org; Thu, 29 Nov 2012 09:48:07 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so6022815eaa.4 for ; Thu, 29 Nov 2012 06:48:06 -0800 (PST) Date: Thu, 29 Nov 2012 15:48:04 +0100 From: Stefan Hajnoczi Message-ID: <20121129144804.GC14196@stefanha-thinkpad.redhat.com> References: <1353597412-12232-1-git-send-email-stefanha@redhat.com> <20121129140928.GF9625@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121129140928.GF9625@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 00/11] virtio: virtio-blk data plane List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Anthony Liguori , qemu-devel , Blue Swirl , Khoa Huynh , Stefan Hajnoczi , Paolo Bonzini , Asias He On Thu, Nov 29, 2012 at 04:09:28PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 29, 2012 at 10:18:59AM +0100, Stefan Hajnoczi wrote: > > Michael, Paolo: Are you happy with v4? > > Looks pretty clean by itself. I sent some comments but they can be > addressed later. What worries me most is the code duplication with > regular virtio. > > I see two ways to reduce the maintainance somewhat > - split out ring handling code in virtio-blk > to a separate file to make it more obvious which part > is inactive when data plane runs. > - share ring processing code with virtio/virtio-blk > (e.g. use callbacks) > > Was any thought given to implementing one of these two > approaches? Yes, your option #2 is where I'd like to move once threaded memory dispatch is working. I hope we can run virtio.c code in a thread outside the global mutex soon. That way we can kill hw/dataplane/vring.[ch]. Ping Fan Liu has been working on the memory API and device emulation stuff that we need in order to eventually use virtio.c outside the global mutex. Stefan