From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuRgC-00041K-7o for qemu-devel@nongnu.org; Fri, 28 Nov 2014 14:58:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuRg6-0008EI-2W for qemu-devel@nongnu.org; Fri, 28 Nov 2014 14:58:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuRg5-0008E0-Qa for qemu-devel@nongnu.org; Fri, 28 Nov 2014 14:58:05 -0500 Message-ID: <5478D3BF.1010405@redhat.com> Date: Fri, 28 Nov 2014 20:57:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1417183941-26329-1-git-send-email-pbonzini@redhat.com> <1417183941-26329-6-git-send-email-pbonzini@redhat.com> <20141128164023.GH4035@noname.redhat.com> <5478B17B.2020605@redhat.com> <20141128183401.GI4035@noname.redhat.com> In-Reply-To: <20141128183401.GI4035@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/7] coroutine: rewrite pool to avoid mutex List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: ming.lei@canonical.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com On 28/11/2014 19:34, Kevin Wolf wrote: >>> > > Not sure if speculations about the future belong into commit messages, >>> > > but while it may turn out that a bypass is required in the end (I hope >>> > > it doesn't), the part about AIOCBs is wrong if you really consistently >>> > > use coroutines all the way down from the device to the block driver. >> > >> > This is much harder for virtio-scsi than for virtio-blk, though. > Why is that? At least replacing the bdrv_aio_*() call by > coroutine_create/coroutine_enter/bdrv_co_*() is a mechanical change that > shouldn't be any harder for virtio-scsi. Whether we can optimise even > more by integration the device more with coroutines might be a different > problem, but at this point you've already got rid of AIOCBs. Because I/O is done by the generic SCSI code, so you'd have to modify that and the DMA helpers. And the generic SCSI code is itself written asynchronously in order to support HBAs that use a bounce buffer. Paolo