aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rhashtable.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-07 13:41:56 +0800
committerDavid S. Miller <davem@davemloft.net>2015-01-08 19:47:11 -0800
commitc0c09bfdc4150b3918526660768585cd477adf35 (patch)
treeb314052625dceb2550c4b3c4b57ed609896127a6 /include/linux/rhashtable.h
parentrhashtable: future table needs to be traversed when remove an object (diff)
downloadlinux-dev-c0c09bfdc4150b3918526660768585cd477adf35.tar.xz
linux-dev-c0c09bfdc4150b3918526660768585cd477adf35.zip
rhashtable: avoid unnecessary wakeup for worker queue
Move condition statements of verifying whether hash table size exceeds its maximum threshold or reaches its minimum threshold from resizing functions to resizing decision functions, avoiding unnecessary wakeup for worker queue thread. Signed-off-by: Ying Xue <ying.xue@windriver.com> Cc: Thomas Graf <tgraf@suug.ch> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r--include/linux/rhashtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index 73c913f31574..326acd8c2e9f 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -113,7 +113,7 @@ struct rhashtable {
struct bucket_table __rcu *tbl;
struct bucket_table __rcu *future_tbl;
atomic_t nelems;
- size_t shift;
+ atomic_t shift;
struct rhashtable_params p;
struct delayed_work run_work;
struct mutex mutex;