diff options
author | Joel Fernandes (Google) <joel@joelfernandes.org> | 2024-03-19 14:54:57 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2024-06-18 09:59:40 -0700 |
commit | 6f948568fdc66429c9f70e2cecde0664655cc870 (patch) | |
tree | 86112f2aabb95b2b1d67764c8963d97e4e231307 /kernel/rcu/tree.h | |
parent | 32d99593bdc91442fe6183d97b060210cc9c8193 (diff) | |
download | lwn-6f948568fdc66429c9f70e2cecde0664655cc870.tar.gz lwn-6f948568fdc66429c9f70e2cecde0664655cc870.zip |
rcu/tree: Reduce wake up for synchronize_rcu() common case
In the synchronize_rcu() common case, we will have less than
SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker
is pointless just to free the last injected wait head since at that point,
all the users have already been awakened.
Introduce a new counter to track this and prevent the wakeup in the
common case.
[ paulmck: Remove atomic_dec_return_release in cannot-happen state. ]
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree.h')
-rw-r--r-- | kernel/rcu/tree.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index bae7925c497f..affcb92a358c 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -420,6 +420,7 @@ struct rcu_state { struct llist_node *srs_done_tail; /* ready for GP users. */ struct sr_wait_node srs_wait_nodes[SR_NORMAL_GP_WAIT_HEAD_MAX]; struct work_struct srs_cleanup_work; + atomic_t srs_cleanups_pending; /* srs inflight worker cleanups. */ }; /* Values for rcu_state structure's gp_flags field. */ |