[Top][All Lists]

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

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

From: Brian Wheeler
Subject: Re: [Qemu-devel] [PATCH] two level table for IO port lookup
Date: Fri, 10 Apr 2009 15:08:12 -0400

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.  Its probably slower, but I
don't know if it would kill performance, per se...especially since IO
port access isn't the fastest in real life anyway.


reply via email to

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