[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B42629A.2010401@zytor.com>
Date: Mon, 04 Jan 2010 13:50:18 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
CC: Yinghai Lu <yinghai@...nel.org>,
Jesse Brandeburg <jesse.brandeburg@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
NetDEV list <netdev@...r.kernel.org>,
Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: Re: [PATCH 2/2] x86: get more exact nr_irqs
On 01/04/2010 12:05 PM, Eric W. Biederman wrote:
>>
>> rbtree doesn't make much sense for something that is addressed by index,
>> and doesn't need to answer questions of the form "give me the highest
>> member <= X". A hash table or radix tree makes sense, depending on the
>> expected sparseness of the index.
>
> Not counting irqs for msi's I think we are looking 36% to 25% fill. Maybe
> a little lower. The sparseness is much higher if we count the number of
> irqs that we might/use allocate as we do today.
>
> Short of driver hotplug msis should be allocated densely, unless we start
> reserving all possible 4K msi-x vectors.
>
> For each ioapic we allocate 16 gsis, and only maybe four of them are
> connected to actual pci slots.
>
> This is essentially a slow path operation, so as long as we are not
> too expensive we can use any data structure we want. In kernel hash
> tables don't grow well so I don't think a hash table is a good choice,
> and a hash table is essentially what we have now.
>
> The truth is we don't know how many irqs we will have until msi
> supporting drivers claim all of theirs.
>
> I think a radix-tree would likely be the least intrusive choice as it
> does not imply any changes to the data structure indexed.
>
Yes, for that kind of densities radix tree is a good choice.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists