diff options
author | Uladzislau Rezki (Sony) <urezki@gmail.com> | 2021-04-15 19:19:59 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-05-10 16:00:48 -0700 |
commit | dd28c9f057ad099f6221829053e48f331e6f0b7f (patch) | |
tree | 3dc124fadfdfc0dcc7f4a4dd5d71d2272cf614e1 /kernel | |
parent | d434c00fa3ac476ca6295b8310d097dd71984624 (diff) | |
download | linux-stable-dd28c9f057ad099f6221829053e48f331e6f0b7f.tar.gz linux-stable-dd28c9f057ad099f6221829053e48f331e6f0b7f.tar.bz2 linux-stable-dd28c9f057ad099f6221829053e48f331e6f0b7f.zip |
kvfree_rcu: Update "monitor_todo" once a batch is started
Before attempting to start a new batch the "monitor_todo" variable is
set to "false" and set back to "true" when a previous RCU batch is still
in progress. This is at best confusing.
Thus change this variable to "false" only when a new batch has been
successfully queued, otherwise, just leave it be.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcu/tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index e86f32d6b8f9..1ae5f88e475f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -3442,15 +3442,14 @@ static inline void kfree_rcu_drain_unlock(struct kfree_rcu_cpu *krcp, unsigned long flags) { // Attempt to start a new batch. - krcp->monitor_todo = false; if (queue_kfree_rcu_work(krcp)) { // Success! Our job is done here. + krcp->monitor_todo = false; raw_spin_unlock_irqrestore(&krcp->lock, flags); return; } // Previous RCU batch still in progress, try again later. - krcp->monitor_todo = true; schedule_delayed_work(&krcp->monitor_work, KFREE_DRAIN_JIFFIES); raw_spin_unlock_irqrestore(&krcp->lock, flags); } |