]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
percpu-rwsem: Replace synchronize_sched() with synchronize_rcu()
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 7 Nov 2018 21:53:34 +0000 (13:53 -0800)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Sat, 1 Dec 2018 20:38:48 +0000 (12:38 -0800)
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@linux.ibm.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Acked-by: Tejun Heo <tj@kernel.org>
include/linux/percpu-rwsem.h

index 79b99d653e030d113e4401fc26c7b47e81dcff8c..71b75643c432044e30a426538c7c9640785be3dc 100644 (file)
@@ -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);