From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1NJV-0004sN-3k for qemu-devel@nongnu.org; Wed, 28 May 2008 11:11:41 -0400 Received: from [199.232.76.173] (port=39280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1NJU-0004sF-IM for qemu-devel@nongnu.org; Wed, 28 May 2008 11:11:40 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:49327) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K1NJU-0007tA-9O for qemu-devel@nongnu.org; Wed, 28 May 2008 11:11:40 -0400 Message-ID: <483D7625.2030807@bellard.org> Date: Wed, 28 May 2008 17:11:33 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [4600] variable dynamic translation buffer size References: <200805281355.53574.paul@codesourcery.com> In-Reply-To: <200805281355.53574.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paul Brook Paul Brook wrote: > On Wednesday 28 May 2008, Fabrice Bellard wrote: >> + code_gen_buffer = mmap(NULL, code_gen_buffer_size, >> + PROT_WRITE | PROT_READ | PROT_EXEC, >> + flags, -1, 0); > > I'd expect this to cause a significant performance regression on hosts that > have limited branch range (i.e. everything except x86). The mmap region is > almost never close to the application text segment, so all helper calls have > to be indirect. I knew that when I did the patch, but having a dynamic size on x86 hosts prevails. The other hosts can still implement hacks if they really need to, either by reserving a huge data in BSS as it was done before or by using the proc/x/maps entries to compute a possible mmap() address. IMHO I think this is unnecessary as helpers should be the exception. Fabrice.