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:

committed by
David S. Miller

parent
bd6d4db552
commit
c0c09bfdc4
@@ -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;
|
||||
|
Reference in New Issue
Block a user