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>
This commit is contained in:
parent
bd6d4db552
commit
c0c09bfdc4
2 changed files with 8 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue