Re: Buggy rhashtable walking

3 messages, 3 authors, 2016-08-05 · open the first message on its own page

Re: Buggy rhashtable walking

From: Herbert Xu <hidden>
Date: 2016-08-05 10:48:58

On Fri, Aug 05, 2016 at 08:16:53AM +0200, Johannes Berg wrote:
Hm. Would you rather allocate a separate head entry for the hashtable,
or chain the entries?
My plan is to build support for this directly into rhashtable.
So I'm adding a struct rhlist_head that would be used in place
of rhash_head for these cases and it'll carry an extra pointer
for the list of identical entries.

I will then add an additional layer of insert/lookup interfaces
for rhlist_head.

So bottom-line is that if you have no identical entries that you
only incur an extra 8 bytes per-object.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: Buggy rhashtable walking

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2016-08-05 10:50:42

On Fri, 2016-08-05 at 18:48 +0800, Herbert Xu wrote:
On Fri, Aug 05, 2016 at 08:16:53AM +0200, Johannes Berg wrote:
quoted
Hm. Would you rather allocate a separate head entry for the
hashtable,
or chain the entries?
My plan is to build support for this directly into rhashtable.
So I'm adding a struct rhlist_head that would be used in place
of rhash_head for these cases and it'll carry an extra pointer
for the list of identical entries.

I will then add an additional layer of insert/lookup interfaces
for rhlist_head.
Oh, ok.
So bottom-line is that if you have no identical entries that you
only incur an extra 8 bytes per-object.
Right.

Thanks!

johannes

Re: Buggy rhashtable walking

From: Ben Greear <hidden>
Date: 2016-08-05 11:46:45


On 08/05/2016 03:50 AM, Johannes Berg wrote:
On Fri, 2016-08-05 at 18:48 +0800, Herbert Xu wrote:
quoted
On Fri, Aug 05, 2016 at 08:16:53AM +0200, Johannes Berg wrote:
quoted
Hm. Would you rather allocate a separate head entry for the
hashtable,
or chain the entries?
My plan is to build support for this directly into rhashtable.
So I'm adding a struct rhlist_head that would be used in place
of rhash_head for these cases and it'll carry an extra pointer
for the list of identical entries.

I will then add an additional layer of insert/lookup interfaces
for rhlist_head.
Herbert, thank you for fixing this!

It would not be fun to have to revert to the old way of hashing
stations in mac80211...

I'll be happy to test the patches when you have them ready.

Ben


-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help