Received: from eggs.gnu.org ([2001:4830:134:3::10]:41881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuG3K-0008Ot-AR for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:33:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuG3F-0003hN-D9 for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:33:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuG3F-0003hJ-6W for qemu-devel@nongnu.org; Fri, 28 Nov 2014 02:33:13 -0500 From: Markus Armbruster References: <1417013204-30676-1-git-send-email-kwolf@redhat.com> <1417013204-30676-3-git-send-email-kwolf@redhat.com> Date: Fri, 28 Nov 2014 08:33:02 +0100 In-Reply-To: (Ming Lei's message of "Fri, 28 Nov 2014 10:59:33 +0800") Message-ID: <87h9xj93v5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC PATCH 2/3] raw-posix: Convert Linux AIO submission to coroutines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Paolo Bonzini , pl@kamp.de, qemu-devel , Stefan Hajnoczi Ming Lei writes: > Hi Kevin, > > On Wed, Nov 26, 2014 at 10:46 PM, Kevin Wolf wrote: >> This improves the performance of requests because an ACB doesn't need to >> be allocated on the heap any more. It also makes the code nicer and >> smaller. > > I am not sure it is good way for linux aio optimization: > > - for raw image with some constraint, coroutine can be avoided since > io_submit() won't sleep most of times > > - handling one time coroutine takes much time than handling malloc, > memset and free on small buffer, following the test data: > > -- 241ns per coroutine What do you mean by "coroutine" here? Create + destroy? Yield? > -- 61ns per (malloc, memset, free for 128bytes) > > I still think we should figure out a fast path to avoid cocourinte > for linux-aio with raw image, otherwise it can't scale well for high > IOPS device. > > Also we can use simple buf pool to avoid the dynamic allocation > easily, can't we? [...]