qemu-devel
[Top][All Lists]
Advanced

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

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


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] two level table for IO port lookup
Date: Fri, 10 Apr 2009 19:24:13 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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: signature.asc
Description: OpenPGP digital signature


reply via email to

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