From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHuyJ-0001D9-Pn for qemu-devel@nongnu.org; Tue, 28 Jun 2016 11:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHuyG-0007Lx-CJ for qemu-devel@nongnu.org; Tue, 28 Jun 2016 11:30:43 -0400 Sender: Paolo Bonzini References: <20160624123934.10821-1-famz@redhat.com> <20160624123934.10821-6-famz@redhat.com> <20160628151244.GQ2798@stefanha-x1.localdomain> From: Paolo Bonzini Message-ID: <1bb10ce4-186b-ed17-c02d-60ce05e1046f@redhat.com> Date: Tue, 28 Jun 2016 17:30:31 +0200 MIME-Version: 1.0 In-Reply-To: <20160628151244.GQ2798@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Fam Zheng Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , Jeff Cody , qemu-devel@nongnu.org, Max Reitz On 28/06/2016 17:12, Stefan Hajnoczi wrote:\ > It's weird that virtio_add_queue_aio() doesn't take an AioContext. > > This change moves us one step closer to dropping dataplane-specific > code. The difference between dataplane and non-dataplane should simply > by the virtqueue's AioContext, which should come from BlockBackend's > AioContext. > > Anyway, not a deal-breaker but I think we should make the AioContext > explicit in the future... I agree, and in fact I think that the virtio_add_queue_aio API should be temporary. Hopefully, now that ioeventfd APIs have been cleaned up and all backends have support for it, we can move the ioeventfd down from the proxy devices (virtio-*-pci) to the actual virtio devices. This would let virtio-blk and virtio-scsi know whether ioeventfd is in use (they currently can't see that), and start the dataplane event handlers on the first kick when ioeventfd is enabled. For them to do this it is not necessary to use virtio_add_queue_aio; the first kick can use the normal virtio_add_queue registration functions. However, this fix is much nicer than the one we currently have, so I am in favor of it. I would squash patches 3 and 4 together, though. Paolo Paolo