From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auiOD-0007A1-NB for qemu-devel@nongnu.org; Mon, 25 Apr 2016 11:25:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auiOA-0000xH-EB for qemu-devel@nongnu.org; Mon, 25 Apr 2016 11:25:33 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auiOA-0000wq-8e for qemu-devel@nongnu.org; Mon, 25 Apr 2016 11:25:30 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D97B02876D for ; Mon, 25 Apr 2016 11:25:28 -0400 (EDT) Date: Mon, 25 Apr 2016 11:25:28 -0400 From: "Emilio G. Cota" Message-ID: <20160425152528.GA16402@flamenco> References: <571A6C85.5020707@twiddle.net> <1461468462-31118-1-git-send-email-cota@braap.org> <87vb35emw0.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87vb35emw0.fsf@linaro.org> Subject: Re: [Qemu-devel] [RFC v2] translate-all: protect code_gen_buffer with RCU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: QEMU Developers , MTTCG Devel , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Sergey Fedorov On Mon, Apr 25, 2016 at 16:19:59 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > [ Applies on top of bennee/mttcg/enable-mttcg-for-armv7-v1 after > > reverting "translate-all: introduces tb_flush_safe". A trivial > > conflict must be solved after applying. ] > > > > This is a first attempt at making tb_flush not have to stop all CPUs. > > There are issues as pointed out below, but this could be a good start. > > > > Context: > > https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg04658.html > > https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg06942.html > > > > Changes from v1: > > - When a static buffer is used, split it in two instead of using > > a second buffer. > > > > Known issues: > > - Fails Alex' unit test with low enough -tb-size, see > > https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg03465.html > > Seems to work in MTTCG, although I've only tested with tb_lock > > always being taken in tb_find_fast. > > With --enable-debug-tcg I get it failing pretty quickly: > > #4 0x00005555556d332a in tcg_global_alloc (s=0x555556007ba0 ) > at /home/alex/lsrc/qemu/qemu.git/tcg/tcg.c:463 > 463 tcg_debug_assert(s->nb_globals == s->nb_temps); > (gdb) p s->nb_globals > $1 = 24 > (gdb) p s->nb_temps > $2 = 31 > Seems odd though, the other threads are all waiting on the tb_lock. It must be the tcg_prologue_init call, as Richard pointed out. I'm on it, will report back. Thanks, E.