From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azmka-0002BQ-EC for qemu-devel@nongnu.org; Mon, 09 May 2016 11:05:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azmkT-0001EB-DM for qemu-devel@nongnu.org; Mon, 09 May 2016 11:05:35 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:38084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azmkT-0001DM-1d for qemu-devel@nongnu.org; Mon, 09 May 2016 11:05:29 -0400 Received: by mail-wm0-x234.google.com with SMTP id g17so192328326wme.1 for ; Mon, 09 May 2016 08:05:28 -0700 (PDT) References: <20160425152528.GA16402@flamenco> <1461627983-32563-1-git-send-email-cota@braap.org> <87shy8ev7c.fsf@linaro.org> <20160430034035.GA31609@flamenco> <573072CE.3070808@redhat.com> <87bn4fzc0g.fsf@linaro.org> <573096EA.9070507@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <573096EA.9070507@redhat.com> Date: Mon, 09 May 2016 16:05:44 +0100 Message-ID: <8760unz2yf.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC v3] translate-all: protect code_gen_buffer with RCU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Emilio G. Cota" , QEMU Developers , MTTCG Devel , Peter Crosthwaite , Richard Henderson , Sergey Fedorov Paolo Bonzini writes: > On 09/05/2016 13:50, Alex Bennée wrote: >> > Which locks? tb_lock during tb_find_fast? The problem with that was >> > that it slowed down everything a lot, wasn't it? >> >> Very much so, in the new tree (coming soon) with QHT I was able to >> remove the locks from the whole hot-path which means they where only >> needed for code generation. > > Okay, I'm curious now. :) https://github.com/stsquad/qemu/commits/mttcg/base-patches-v3 is the current WIP, with: https://github.com/stsquad/qemu/commit/0823f1c77f12ed5958f77484d6477ea205aee220 being the commit that clears the hot-path to run without locks. The tree is based on tcg-next which has made things a lot cleaner now a bunch of Sergey's stuff has been grabbed by rth. Obviously being WIP subject to change. Once I'm done with my current out-of-tree diversions I'll be back onto cleaning the tree up for the next review round. Review comments on the posted tree's always welcome of course ;-) > >> > To me, the RCU idea is not really about making tb_flush (the rare case) >> > faster; it was more about keeping the rest simple and fast. >> >> I'm not sure it achieved that as there is added complexity from having >> the split buffer and then ensuring you don't double-flush. > > Agreed. > > Paolo -- Alex Bennée