Re: [PATCH 2/6] rhashtable: Use a single bucket lock for sibling buckets
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2015-01-31 04:34:43
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2015-01-31 04:34:43
Thomas Graf [off-list ref] wrote:
rhashtable currently allows to use a bucket lock per bucket. This requires multiple levels of complicated nested locking because when resizing, a single bucket of the smaller table will map to two buckets in the larger table. So far rhashtable has explicitly locked both buckets in the larger table. By excluding the highest bit of the hash from the bucket lock map and thus only allowing locks to buckets in a ratio of 1:2, the locking can be simplified a lot without losing the benefits of multiple locks. Larger tables which benefit from multiple locks will not have a single lock per bucket anyway. Signed-off-by: Thomas Graf <tgraf@suug.ch>
Thomas, could you please hold off on these changes? They totally conflict with my rehash work, which is going to render these changes moot anyway since it'll completely change how expansion/shrinking works. Thanks, -- Email: Herbert Xu [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt