Received: from eggs.gnu.org ([140.186.70.92]:33225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLeQr-0000aQ-42 for qemu-devel@nongnu.org; Wed, 02 Nov 2011 13:16:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLeQp-0003JT-Lq for qemu-devel@nongnu.org; Wed, 02 Nov 2011 13:16:57 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:53740 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLeQp-0003JE-Bo for qemu-devel@nongnu.org; Wed, 02 Nov 2011 13:16:55 -0400 Date: Wed, 2 Nov 2011 21:16:50 +0400 (MSK) From: malc In-Reply-To: <4EB1796B.7050901@adacore.com> Message-ID: References: <4EB1640F.2090604@adacore.com> <4EB1796B.7050901@adacore.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] Multiple instances of Qemu on Windows multicore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabien Chouteau Cc: Paolo Bonzini , qemu-devel@nongnu.org On Wed, 2 Nov 2011, Fabien Chouteau wrote: > On 02/11/2011 17:25, Paolo Bonzini wrote: > > On 11/02/2011 04:38 PM, Fabien Chouteau wrote: > >> Hello fellow Qemu aficionados, > >> > >> On Windows, Qemu sets the affinity mask in order to run all thread on > >> CPU0, with this comment in the code (os-win32.c:182): > >> > >> /* Note: cpu_interrupt() is currently not SMP safe, so we force > >> QEMU to run on a single CPU */ > >> > >> This was added by Fabrice Bellard in 2006 (git show a8e5ac33d). > >> > >> I can't find/understand any reason for this CPU affinity restriction. > > > > Have you tried looking for a justification in the mailing lists? > > Yes, and I found few mails from Fabrice Bellard and Konrad Schwarz in > the archives: > > http://thread.gmane.org/gmane.comp.emulators.qemu/13804 > > and > > http://thread.gmane.org/gmane.comp.emulators.qemu/13831/focus=13805 > > But it didn't provide more information about the problem. > > > > > Also, I suppose you have tested without the affinity mask and it works? > > > > Yes I did, it works pretty well. I had 1 unexpected failure among ~6000 > tests. But I would like to have a substantial explanation. > > > > > Offhand I cannot think of why that would be needed. > > > > OK, thanks for your help. (mm)Timers have a possibility of running on a thread of their own which might be schedulled on the CPU different from the thread that runs emulated code, unchaining TBs and can (and will) fail in this case. -- mailto:av1474@comtv.ru