All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] two level table for IO port lookup
Date: Fri, 10 Apr 2009 23:31:48 +0100	[thread overview]
Message-ID: <20090410223148.GA23259@shareable.org> (raw)
In-Reply-To: <1239390492.20162.63.camel@nibbler.dlib.indiana.edu>

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	other threads:[~2009-04-10 22:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 14:48 [Qemu-devel] [PATCH] two level table for IO port lookup Brian Wheeler
2009-04-10 15:17 ` [Qemu-devel] " Jan Kiszka
2009-04-10 15:46   ` [Qemu-devel] Re: [PATCH] two level table for IO port lookup [Patch updated] Brian Wheeler
2009-04-10 17:26     ` Jan Kiszka
2009-04-10 18:53       ` [Qemu-devel] Re: [PATCH] two level table for IO port lookup [Patch V3] Brian Wheeler
2009-04-10 16:03 ` [Qemu-devel] [PATCH] two level table for IO port lookup Anthony Liguori
2009-04-10 17:24   ` [Qemu-devel] " Jan Kiszka
2009-04-10 19:08   ` [Qemu-devel] " Brian Wheeler
2009-04-10 22:31     ` Jamie Lokier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090410223148.GA23259@shareable.org \
    --to=jamie@shareable.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.