diff options
author | David S. Miller <davem@davemloft.net> | 2019-04-07 19:12:12 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-07 19:12:12 -0700 |
commit | 9186c90bbb9525f46eddb590be26c749b5b1def7 (patch) | |
tree | b2fc4e6c9902041bcdb4c8bfc44d2d5d3040088c /lib/test_rhashtable.c | |
parent | 1e045a62eea6a60f0463b01f72256a5ba483da1c (diff) | |
parent | 149212f07856b25a9d342bfd6d736519b2ef66dc (diff) |
Merge branch 'rhashtable-bitlocks'
NeilBrown says:
====================
Convert rhashtable to use bitlocks
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/test_rhashtable.c')
-rw-r--r-- | lib/test_rhashtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index 3bd2e91bfc29..02592c2a249c 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -500,7 +500,7 @@ static unsigned int __init print_ht(struct rhltable *rhlt) struct rhash_head *pos, *next; struct test_obj_rhl *p; - pos = rht_dereference(tbl->buckets[i], ht); + pos = rht_ptr(rht_dereference(tbl->buckets[i], ht)); next = !rht_is_a_nulls(pos) ? rht_dereference(pos->next, ht) : NULL; if (!rht_is_a_nulls(pos)) { |