diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-01-07 08:41:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-09 06:47:11 +0300 |
commit | c0c09bfdc4150b3918526660768585cd477adf35 (patch) | |
tree | b314052625dceb2550c4b3c4b57ed609896127a6 /include/linux | |
parent | bd6d4db552ceb52fb19890a454836dcda59743ce (diff) | |
download | linux-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/linux')
-rw-r--r-- | include/linux/rhashtable.h | 2 |
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; |