From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsKSq-0002sl-GO for qemu-devel@nongnu.org; Fri, 10 Apr 2009 13:24:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsKSk-0002ru-Vn for qemu-devel@nongnu.org; Fri, 10 Apr 2009 13:24:27 -0400 Received: from [199.232.76.173] (port=42384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsKSk-0002ro-OG for qemu-devel@nongnu.org; Fri, 10 Apr 2009 13:24:22 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:57198) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsKSk-0006hx-6u for qemu-devel@nongnu.org; Fri, 10 Apr 2009 13:24:22 -0400 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id B3713FCCAD57 for ; Fri, 10 Apr 2009 19:24:20 +0200 (CEST) Received: from [88.66.126.154] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1LsKSh-0008GW-00 for qemu-devel@nongnu.org; Fri, 10 Apr 2009 19:24:19 +0200 Message-ID: <49DF80BD.7020601@web.de> Date: Fri, 10 Apr 2009 19:24:13 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1239374905.28083.21.camel@nibbler.dlib.indiana.edu> <49DF6DD0.3090508@codemonkey.ws> In-Reply-To: <49DF6DD0.3090508@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig768A352FF4D90524F7F3F22F" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] two level table for IO port lookup 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig768A352FF4D90524F7F3F22F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Anthony Liguori wrote: > Brian Wheeler wrote: >> The alpha architecture uses 24 bits for the io port address so this >> patch adds a two level table and puts the IO port data into a >> struct...because sizeof(void *) * 7 * 16777216 is nearly a 1G on my >> workstation. >> >> I've set the alpha target to use a 12/12 split and everything else to >> use 8/8. =20 >=20 > The table lookups really kill performance. It's probably a better idea= > just to switch to a linear list of IO ports. There's usually going to > be a small number of registered IO regions (certainly, less than 100). Sorry, can't follow: you want to search a linear list of at least a few ten entries on average instead of doing a simple two-stage table lookup? If you had said: "Use a tree." Maybe. But even then you can quickly end up consulting >2 entries before finding the right one. Nevertheless, numbers on the performance impact and memory consumption of this patch would surely help to decide which way to go. Jan --------------enig768A352FF4D90524F7F3F22F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAknfgMMACgkQniDOoMHTA+mnTQCeJUI/B6/4v0AyHXqMJ++moA3A 4fkAn0e6p+Sez46mjJo7X2bUUXQJ1cLx =hDBQ -----END PGP SIGNATURE----- --------------enig768A352FF4D90524F7F3F22F--