qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] two level table for IO port lookup


From: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH] two level table for IO port lookup
Date: Fri, 10 Apr 2009 23:31:48 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Brian Wheeler wrote:
> On Fri, 2009-04-10 at 11:03 -0500, 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.  
> > >   
> > 
> > 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).
> 

> Well, on ioport_read the hot path does 2 lookups and a null check.  The
> new one does 3 lookups, and two null checks.

You could reduce it to one null check by pointing null top-level
entries to an a shared all-nulls leaf table.  I doubt it would make
any difference to performance though.

-- Jamie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]