From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35797 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsE3s-0003Nc-1a for qemu-devel@nongnu.org; Wed, 23 Feb 2011 07:43:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsE3c-00075T-Jj for qemu-devel@nongnu.org; Wed, 23 Feb 2011 07:43:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsE3c-00075J-8r for qemu-devel@nongnu.org; Wed, 23 Feb 2011 07:43:04 -0500 Message-ID: <4D6500D3.40205@redhat.com> Date: Wed, 23 Feb 2011 13:42:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1298278286-9158-1-git-send-email-pbonzini@redhat.com> <20110223101806.GA27880@edde.se.axis.com> <4D64E0B2.3050900@redhat.com> <20110223110850.GB27880@edde.se.axis.com> In-Reply-To: <20110223110850.GB27880@edde.se.axis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/4] Improve -icount, fix it with iothread List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: qemu-devel@nongnu.org On 02/23/2011 12:08 PM, Edgar E. Iglesias wrote: >> > No, this supersedes Marcelo's patch. 10-20% doesn't seem comparable to >> > "looks like it deadlocked" anyway. Also, Jan has ideas on how to remove >> > the synchronization overhead in the main loop for TCG+iothread. > I see. I tried booting two of my MIPS and CRIS linux guests with iothread > and -icount 4. Without your patch, the boot crawls super slow. Your patch > gives a huge improvement. This was the "deadlock" scenario which I > mentioned in previous emails. > > Just to clarify the previous test where I saw slowdown with your patch: > A CRIS setup that has a CRIS and basically only two peripherals, > a timer block and a device (X) that computes stuff but delays the results > with a virtual timer. The guest CPU is 99% of the time just > busy-waiting for device X to get ready. > > This latter test runs in 3.7s with icount 4 and without iothread, > with or without your patch. Thanks for testing this. > With icount 4 and iothread it runs in ~1m5s without your patch and > ~1m20s with your patch. That was the 20% slowdown I mentioned earlier. Ok, so it is in both cases with iothread. We go from 16x slowdown to 19x on one testcase :) and "huge improvement" on another. (Also, the CRIS images on qemu.org simply hang for me without my patch and numeric icount---and the watchdog triggers---so that's another factor in favor of the patches). I guess we can live with the slowdown for now, if somebody else finds the patch okay. Do you have images for the slow test? Paolo