[tip:core/rcu] percpu-rwsem: Replace synchronize_sched() with synchronize_rcu()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  e3e740544173ef0dd8bffbf158182a7748e6c678
Gitweb:     https://git.kernel.org/tip/e3e740544173ef0dd8bffbf158182a7748e6c678
Author:     Paul E. McKenney <paulmck@xxxxxxxxxxxxx>
AuthorDate: Wed, 7 Nov 2018 13:53:34 -0800
Committer:  Paul E. McKenney <paulmck@xxxxxxxxxxxxx>
CommitDate: Sat, 1 Dec 2018 12:38:48 -0800

percpu-rwsem: Replace synchronize_sched() with synchronize_rcu()

Now that synchronize_rcu() waits for preempt-disable regions of code
as well as RCU read-side critical sections, synchronize_sched() can be
replaced by synchronize_rcu().  This commit therefore makes this change,
even though it is but a comment.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxx>
Cc: Dennis Zhou <dennis@xxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
---
 include/linux/percpu-rwsem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h
index 79b99d653e03..71b75643c432 100644
--- a/include/linux/percpu-rwsem.h
+++ b/include/linux/percpu-rwsem.h
@@ -41,7 +41,7 @@ static inline void percpu_down_read_preempt_disable(struct percpu_rw_semaphore *
 	 * cannot both change sem->state from readers_fast and start checking
 	 * counters while we are here. So if we see !sem->state, we know that
 	 * the writer won't be checking until we're past the preempt_enable()
-	 * and that one the synchronize_sched() is done, the writer will see
+	 * and that once the synchronize_rcu() is done, the writer will see
 	 * anything we did within this RCU-sched read-size critical section.
 	 */
 	__this_cpu_inc(*sem->read_count);



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux