From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuQN0-0007Vo-S2 for qemu-devel@nongnu.org; Fri, 28 Nov 2014 13:34:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuQMu-0006xN-M7 for qemu-devel@nongnu.org; Fri, 28 Nov 2014 13:34:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuQMu-0006xJ-Dh for qemu-devel@nongnu.org; Fri, 28 Nov 2014 13:34:12 -0500 Date: Fri, 28 Nov 2014 19:34:01 +0100 From: Kevin Wolf Message-ID: <20141128183401.GI4035@noname.redhat.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5478B17B.2020605@redhat.com> 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: Paolo Bonzini Cc: ming.lei@canonical.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com Am 28.11.2014 um 18:31 hat Paolo Bonzini geschrieben: > > > On 28/11/2014 17:40, Kevin Wolf wrote: > >> > I still believe we will end with some kind of coroutine bypass scheme > >> > (even coroutines _do_ allocate an AIOCB, so calling bdrv_aio_readv > >> > directly can help), but hey it cannot hurt to optimize hot code. > > > > 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. Kevin