aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-01-02 17:00:18 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-03 14:32:57 -0500
commit897362e446436d245972e72c6bc5b33bd7a5c659 (patch)
treeefddc040f4d1042b486100cb20c3c3036b292420 /include/linux
parentb8e1943e9f754219bcfb40bac4a605b5348acb25 (diff)
nft_hash: Remove rhashtable_remove_pprev()
The removal function of nft_hash currently stores a reference to the previous element during lookup which is used to optimize removal later on. This was possible because a lock is held throughout calling rhashtable_lookup() and rhashtable_remove(). With the introdution of deferred table resizing in parallel to lookups and insertions, the nftables lock will no longer synchronize all table mutations and the stored pprev may become invalid. Removing this optimization makes removal slightly more expensive on average but allows taking the resize cost out of the insert and remove path. Signed-off-by: Thomas Graf <tgraf@suug.ch> Cc: netfilter-devel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rhashtable.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index b54e24a08806..f624d4b5045f 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -105,8 +105,6 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params);
105 105
106void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node); 106void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node);
107bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node); 107bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node);
108void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj,
109 struct rhash_head __rcu **pprev);
110 108
111bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); 109bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size);
112bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); 110bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size);