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