From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an3Ns-0005db-Bc for qemu-devel@nongnu.org; Mon, 04 Apr 2016 08:13:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an3Nm-0005kp-Oj for qemu-devel@nongnu.org; Mon, 04 Apr 2016 08:13:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an3Nm-0005kl-Ji for qemu-devel@nongnu.org; Mon, 04 Apr 2016 08:13:26 -0400 References: <87y48tu53d.fsf@linaro.org> <57022D7A.1040507@redhat.com> <57024478.2080506@gmail.com> <87wpodty5d.fsf@linaro.org> <57025113.7000101@redhat.com> <87vb3xtwg1.fsf@linaro.org> From: Paolo Bonzini Message-ID: <57025A5E.3020008@redhat.com> Date: Mon, 4 Apr 2016 14:13:18 +0200 MIME-Version: 1.0 In-Reply-To: <87vb3xtwg1.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: MTTCG Devel , Peter Maydell , QEMU Developers , Cota@braap.org, Sergey Fedorov , Richard Henderson On 04/04/2016 14:01, Alex Benn=C3=A9e wrote: > > > - is pretty ugly anyway > > > > What exactly makes it ugly? > > Subjective I guess but the use of tb_lock_recursive() and > tb_lock_reset() seem not as clean as they could be. Is this stuff Fred > re-introduced? I think tb_lock_recursive is mine, while tb_lock_reset is from Fred. I concede that those functions are a bit ugly, but that is unrelated to the "tb_find_fast outside tb_lock" idea (which was from Fred and gives a ~20% or so speedup at -smp 2; more as the number of VCPUs increases). You could make tb_lock recursive I guess if you want to avoid tb_lock_recursive() but it really just sweeps it under the carpet. tb_lock_reset() is needed anyway because it is used after longjmp. Paolo