Received: from [140.186.70.92] (port=54062 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYl4Y-0007mX-HO for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:55:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PYl4X-0002Ph-Ky for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:55:34 -0500 Received: from hall.aurel32.net ([88.191.126.93]:38965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PYl4X-0002Pd-F6 for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:55:33 -0500 Date: Fri, 31 Dec 2010 20:55:32 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] TCG: Improve tb_phys_hash_func() Message-ID: <20101231195532.GG3615@hall.aurel32.net> References: <1293658044-10244-1-git-send-email-aurelien@aurel32.net> <20101231194602.GF3615@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20101231194602.GF3615@hall.aurel32.net> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Fri, Dec 31, 2010 at 08:46:02PM +0100, Aurelien Jarno wrote: > On Thu, Dec 30, 2010 at 05:55:38PM +0000, Blue Swirl wrote: > > On Wed, Dec 29, 2010 at 9:27 PM, Aurelien Jarno wrote: > > > Most of emulated CPU have instructions aligned on 16 or 32 bits, while > > > on others GCC tries to align the target jump location. This means that > > > 1/2 or 3/4 of tb_phys_hash entries are never used. > > > > > > Update the hash function tb_phys_hash_func() to ignore the two lowest > > > bits of the address. This brings a 6% speed-up when booting a MIPS > > > image. > > > > Nice! The beginning of functions may be aligned to 16 bytes. Would it > > change the performance figures if one or two more bits were ignored? > > > > It makes a noticeable difference on how the TBs are dispatched in the > hash table, but only by a few percents (slightly more on ppc). I am not Here I meant how TBs are dispatched after my patch has been applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net