From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LsJCf-0007kW-Kt for qemu-devel@nongnu.org; Fri, 10 Apr 2009 12:03:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LsJCa-0007fY-4k for qemu-devel@nongnu.org; Fri, 10 Apr 2009 12:03:40 -0400 Received: from [199.232.76.173] (port=36221 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LsJCZ-0007fP-JG for qemu-devel@nongnu.org; Fri, 10 Apr 2009 12:03:35 -0400 Received: from an-out-0708.google.com ([209.85.132.246]:9359) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LsJCZ-0003S1-0o for qemu-devel@nongnu.org; Fri, 10 Apr 2009 12:03:35 -0400 Received: by an-out-0708.google.com with SMTP id c5so792911anc.37 for ; Fri, 10 Apr 2009 09:03:33 -0700 (PDT) Message-ID: <49DF6DD0.3090508@codemonkey.ws> Date: Fri, 10 Apr 2009 11:03:28 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] two level table for IO port lookup References: <1239374905.28083.21.camel@nibbler.dlib.indiana.edu> In-Reply-To: <1239374905.28083.21.camel@nibbler.dlib.indiana.edu> Content-Type: text/plain; charset=ISO-8859-1; 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 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. > 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). Regards, Anthony Liguori