From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbNJW-0002HD-Uv for qemu-devel@nongnu.org; Wed, 03 May 2006 15:47:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbNJU-0002G6-M2 for qemu-devel@nongnu.org; Wed, 03 May 2006 15:47:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbNJU-0002Fy-DG for qemu-devel@nongnu.org; Wed, 03 May 2006 15:47:08 -0400 Received: from [193.7.176.20] (helo=bender.bawue.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FbNJv-0007yx-VX for qemu-devel@nongnu.org; Wed, 03 May 2006 15:47:36 -0400 Received: from lagash (unknown [194.74.144.146]) by bender.bawue.de (Postfix) with ESMTP id 6FA3844D4E for ; Wed, 3 May 2006 21:47:06 +0200 (MEST) Received: from ths by lagash with local (Exim 4.61) (envelope-from ) id 1FbNIh-0007aa-Dd for qemu-devel@nongnu.org; Wed, 03 May 2006 20:46:19 +0100 Date: Wed, 3 May 2006 20:46:19 +0100 Subject: Re: [Qemu-devel] qemu/hw mips_r4k.c Message-ID: <20060503194619.GA18218@networkno.de> References: <20060502232924.GJ5004@networkno.de> <44590074.90303@bellard.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44590074.90303@bellard.org> From: Thiemo Seufer 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 Fabrice Bellard wrote: > Thiemo Seufer wrote: > >Fabrice Bellard wrote: > > > >>CVSROOT: /sources/qemu > >>Module name: qemu > >>Branch: > >>Changes by: Fabrice Bellard 06/05/02 > >>22:18:28 > >> > >>Modified files: > >> hw : mips_r4k.c > >> > >>Log message: > >> performance boost (on P4 hosts at least, rdtsc is a _very_ bad > >> random generator) > >> > >>CVSWeb URLs: > >>http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/mips_r4k.c.diff?tr1=1.15&tr2=1.16&r1=text&r2=text > > > > > >Does this really provide a measurable performance improvement? > >Real hardware simply increments cp0_random together with the cycle > >counter, this is randomized enough for TLB entry replacement. > > Unfortunately, at least on my P4 PC it is not random enough: it is > always a multiple of two, so the number of TLBs is divided by two ! The > speed improvement is _very_ noticeable. > > Your patch to accelerate tlb_flush_page() is still interesting, but I > would like to be sure that it does not reduce the speed of the x86 > target. In particular, it could be possible to make it even faster by > reducing the size of the memset by using a smarter hash for tb_jmp_cache > (a few bit of the index could depend only on the memory page number). As interim solution I moved it to mips specific code, I still don't trust the MIPS TLB handling that much since it starts to fail once I remove seemingly unnecessary flushes. I still have nearly no time to work on qemu ATM. :-( Thiemo