summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-07 08:41:56 +0300
committerDavid S. Miller <davem@davemloft.net>2015-01-09 06:47:11 +0300
commitc0c09bfdc4150b3918526660768585cd477adf35 (patch)
treeb314052625dceb2550c4b3c4b57ed609896127a6 /include
parentbd6d4db552ceb52fb19890a454836dcda59743ce (diff)
downloadlinux-c0c09bfdc4150b3918526660768585cd477adf35.tar.xz
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')
-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;