[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220316144255.336021-2-frederic@kernel.org>
Date: Wed, 16 Mar 2022 15:42:52 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: "Paul E . McKenney" <paulmck@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Uladzislau Rezki <uladzislau.rezki@...y.com>,
Boqun Feng <boqun.feng@...il.com>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Joel Fernandes <joel@...lfernandes.org>
Subject: [PATCH 1/4] rcu: Remove needless polling work requeue for further waiter
If another expedited polling site is waiting for the next grace period,
there is no need to requeue the work because it is guaranteed to be
either already queued or executing the actual polling upon completion.
Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
Cc: Neeraj Upadhyay <quic_neeraju@...cinc.com>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: Uladzislau Rezki <uladzislau.rezki@...y.com>
Cc: Joel Fernandes <joel@...lfernandes.org>
---
kernel/rcu/tree_exp.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index a6cb02a4d27c..b6fd857f34ba 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -919,9 +919,7 @@ static void sync_rcu_do_polled_gp(struct work_struct *wp)
__synchronize_rcu_expedited(true);
raw_spin_lock_irqsave(&rnp->exp_poll_lock, flags);
s = rnp->exp_seq_poll_rq;
- if (!(s & 0x1) && !sync_exp_work_done(s))
- queue_work(rcu_gp_wq, &rnp->exp_poll_wq);
- else
+ if (!(s & 0x1) && sync_exp_work_done(s))
rnp->exp_seq_poll_rq |= 0x1;
raw_spin_unlock_irqrestore(&rnp->exp_poll_lock, flags);
}
--
2.25.1
Powered by blists - more mailing lists