From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvL36-0005eP-98 for qemu-devel@nongnu.org; Mon, 01 Dec 2014 02:05:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvL2x-0008Kf-9J for qemu-devel@nongnu.org; Mon, 01 Dec 2014 02:05:32 -0500 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:57603 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvL2x-0008Hj-08 for qemu-devel@nongnu.org; Mon, 01 Dec 2014 02:05:23 -0500 Message-ID: <547C132D.3070303@kamp.de> Date: Mon, 01 Dec 2014 08:05:17 +0100 From: Peter Lieven MIME-Version: 1.0 References: <1417183941-26329-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/7] coroutine: optimizations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei , Paolo Bonzini Cc: Kevin Wolf , qemu-devel , Stefan Hajnoczi On 01.12.2014 06:55, Ming Lei wrote: > On Fri, Nov 28, 2014 at 10:12 PM, Paolo Bonzini wrote: >> As discussed in the other thread, this brings speedups from >> dropping the coroutine mutex (which serializes multiple iothreads, >> too) and using ELF thread-local storage. >> >> The speedup in perf/cost is about 30% (190->145). Windows port tested >> with tests/test-coroutine.exe under Wine. > The data is very nice, and in my laptop, 'perf cost' can be decreased > from 244ns to 174ns. > > BTW, the cost by using coroutine to run function isn't only from these > helpers(*_yield, *_enter, *_create, and perf-cost just measures > this part of cost), but also some implicit/invisible part. I have some > test cases which can show the problem. If someone is interested, > I can post them in list. Of course, maybe the problem can be solved or impaired. Peter