netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4 v2]  Convert rhashtable to use bitlocks
@ 2019-04-01 23:07 NeilBrown
  2019-04-01 23:07 ` [PATCH 1/4] rhashtable: use cmpxchg() in nested_table_alloc() NeilBrown
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: NeilBrown @ 2019-04-01 23:07 UTC (permalink / raw)
  To: Thomas Graf, Herbert Xu; +Cc: netdev, linux-kernel

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.

Thanks,
NeilBrown

---

NeilBrown (4):
      rhashtable: use cmpxchg() in nested_table_alloc()
      rhashtable: allow rht_bucket_var to return NULL.
      rhashtable: use bit_spin_locks to protect hash bucket.
      rhashtable: add lockdep tracking to bucket bit-spin-locks.


 include/linux/rhashtable-types.h |    2 
 include/linux/rhashtable.h       |  271 ++++++++++++++++++++++++++------------
 ipc/util.c                       |    1 
 lib/rhashtable.c                 |  161 ++++++++++++-----------
 lib/test_rhashtable.c            |    2 
 net/bridge/br_fdb.c              |    1 
 net/bridge/br_multicast.c        |    1 
 net/bridge/br_vlan.c             |    1 
 net/bridge/br_vlan_tunnel.c      |    1 
 net/ipv4/ipmr.c                  |    1 
 net/ipv6/ip6mr.c                 |    1 
 net/netfilter/nf_tables_api.c    |    1 
 12 files changed, 271 insertions(+), 173 deletions(-)

--
Signature


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-04-11 12:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 23:07 [PATCH 0/4 v2] Convert rhashtable to use bitlocks NeilBrown
2019-04-01 23:07 ` [PATCH 1/4] rhashtable: use cmpxchg() in nested_table_alloc() NeilBrown
2019-04-08  2:34   ` Herbert Xu
2019-04-01 23:07 ` [PATCH 2/4] rhashtable: allow rht_bucket_var to return NULL NeilBrown
2019-04-01 23:07 ` [PATCH 4/4] rhashtable: add lockdep tracking to bucket bit-spin-locks NeilBrown
2019-04-01 23:07 ` [PATCH 3/4] rhashtable: use bit_spin_locks to protect hash bucket NeilBrown
2019-04-02 10:11   ` David Laight
2019-04-02 21:10     ` NeilBrown
2019-04-03  9:26       ` David Laight
2019-04-04  0:13         ` NeilBrown
2019-04-08  2:34   ` Herbert Xu
2019-04-10 19:34   ` Guenter Roeck
2019-04-11  0:48     ` NeilBrown
2019-04-11  2:15       ` David Miller
2019-04-11  6:13       ` NeilBrown
2019-04-11  6:40         ` NeilBrown
2019-04-11 12:44           ` Guenter Roeck
2019-04-08  2:12 ` [PATCH 0/4 v2] Convert rhashtable to use bitlocks David Miller
2019-04-08  2:35   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).