[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CB0337A@AcuExch.aculab.com>
Date: Wed, 18 Mar 2015 10:26:31 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Herbert Xu' <herbert@...dor.apana.org.au>,
"'tgraf@...g.ch'" <tgraf@...g.ch>
CC: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: RE: [v1 PATCH 1/14] rhashtable: Remove shift from bucket_table
From: Herbert Xu
..
> Of course I will also add a patch to limit the number of elements
> to the table size (so maximum utilisation is 100%). This will come
> after we allow insertions to fail.
There may be some uses where short hash chains are acceptable.
In which case a utilisation way above 100% may make sense.
If a table is likely to have repeated lookups for the same item
then it can make sense to cache the last looked up item for each chain.
This cached value can be written without any locking - the only
place care is needed is ensuring it doesn't reference an item
that has just been deleted.
(You'd want a separate array to not dirty the cache lines containing
the head pointers. Although for a large table they are misses anyway.)
David
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists