Re: [PATCH 0/4 v2] Convert rhashtable to use bitlocks

From: David Miller
Date: Sun Apr 07 2019 - 22:13:01 EST


From: NeilBrown <neilb@xxxxxxxx>
Date: Tue, 02 Apr 2019 10:07:45 +1100

> This series converts rhashtable to use a per-bucket bitlock
> rather than a separate array of spinlocks.
> This:
> reduces memory usage
> results in slightly fewer memory accesses
> slightly improves parallelism
> makes a configuration option unnecessary
>
> The main change from previous version is to use a distinct type for
> the pointer in the bucket which has a bit-lock in it. This
> helped find two places where rht_ptr() was missed, one
> in rhashtable_free_and_destroy() in print_ht in the test code.

This looks good to me and I haven't seen any major objections.

I think however the thing is encoded, an unsigned long or a pointer,
the cleanliness is basically a wash.

Thanks.