From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] two level table for IO port lookup
Date: Fri, 10 Apr 2009 19:24:13 +0200 [thread overview]
Message-ID: <49DF80BD.7020601@web.de> (raw)
In-Reply-To: <49DF6DD0.3090508@codemonkey.ws>
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
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).
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-04-10 17:24 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 ` Jan Kiszka [this message]
2009-04-10 19:08 ` Brian Wheeler
2009-04-10 22:31 ` Jamie Lokier
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=49DF80BD.7020601@web.de \
--to=jan.kiszka@web.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).