From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTKQ-0007vC-6v for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPTKK-00063T-8y for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:23:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTKK-00063K-1y for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:23:04 -0400 Message-ID: <52454070.5080502@redhat.com> Date: Fri, 27 Sep 2013 10:23:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1380037969-26411-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers Il 25/09/2013 01:39, Peter Maydell ha scritto: > On 25 September 2013 00:52, Paolo Bonzini wrote: >> If -icount is enabled with multiprocessor guests, all CPUs increment >> the same counter, which then basically runs too fast by a factor of >> smp_cpus. This makes little sense and complicates further a feature >> whose implementation is pretty obscure already. > > Just forbidding -icount with SMP configs seems like the wrong > fix, though -- why wouldn't you want the deterministic execution > icount (claims it) gives you with an SMP config? Right now, the SMP version of icount is all but deterministic. I/O and rt_clock timers cause the TCG thread to relinquish the BQL, and the round-robin will switch to the next VCPU. Perhaps once the TCG loop breaks free of the BQL we can modify icount to trigger a VCPU switch every 2^16 instructions or something like that, and revert this patch. Paolo