From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tgaxe-0008Cj-A0 for qemu-devel@nongnu.org; Thu, 06 Dec 2012 07:54:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgaxW-0000js-Lt for qemu-devel@nongnu.org; Thu, 06 Dec 2012 07:53:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgaxW-0000ik-EZ for qemu-devel@nongnu.org; Thu, 06 Dec 2012 07:53:46 -0500 Date: Thu, 6 Dec 2012 13:53:41 +0100 From: Stefan Hajnoczi Message-ID: <20121206125341.GB2241@stefanha-thinkpad.muc.redhat.com> References: <1354740430-22452-1-git-send-email-stefanha@redhat.com> <1354740430-22452-5-git-send-email-stefanha@redhat.com> <20121206112229.GK10837@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121206112229.GK10837@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 04/11] dataplane: add virtqueue vring code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, Blue Swirl , khoa@us.ibm.com, Paolo Bonzini , asias@redhat.com On Thu, Dec 06, 2012 at 01:22:29PM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 05, 2012 at 09:47:03PM +0100, Stefan Hajnoczi wrote: > > The virtio-blk-data-plane cannot access memory using the usual QEMU > > functions since it executes outside the global mutex and the memory APIs > > are this time are not thread-safe. > > > > This patch introduces a virtqueue module based on the kernel's vhost > > vring code. The trick is that we map guest memory ahead of time and > > access it cheaply outside the global mutex. > > Question: can virtio.c be reworked to use vring.c instead? > The cost of keeping an extra memory listener around seems negligeable. > The only issue I see is around dirty tracking for used ring writes. > Maybe we could add a callback for this? virtio.c and dataplane/vring.c will be unified but I think it's beyond the scope of this series. This is the thread-safe memory API refactoring we discussed. Stefan