From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCtFZ-0006xk-Ui for qemu-devel@nongnu.org; Thu, 31 Jul 2014 12:30:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCtFU-00054I-SJ for qemu-devel@nongnu.org; Thu, 31 Jul 2014 12:30:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCtFU-000544-Kw for qemu-devel@nongnu.org; Thu, 31 Jul 2014 12:30:36 -0400 Message-ID: <53DA6F20.3050200@redhat.com> Date: Thu, 31 Jul 2014 18:30:24 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1406720388-18671-1-git-send-email-ming.lei@canonical.com> <1406720388-18671-2-git-send-email-ming.lei@canonical.com> <53D8F6F0.7040106@redhat.com> <53D981C0.4030708@redhat.com> <53DA0940.2030207@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/15] qemu coroutine: support bypass mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel , Stefan Hajnoczi Il 31/07/2014 18:13, Ming Lei ha scritto: > Follows 'perf report' result on cycles event for with/without bypass > coroutine: > > http://pastebin.com/ae0vnQ6V > > From the profiling result, looks bdrv_co_do_preadv() is a bit slow > without bypass coroutine. Yeah, I can count at least 3.3% time spent here: 0.87% bdrv_co_do_preadv 0.79% bdrv_aligned_preadv 0.71% qemu_coroutine_switch 0.52% tracked_request_begin 0.45% coroutine_swap Another ~3% wasted in malloc, etc. I suggest that we discuss it on the phone at next Tuesday's KVM call. I'm not denying that bypassing coroutines is a useful thing to do. But *everyone* should be doing that if it is so useful, and it's hard to do it without causing code duplication. Paolo