Commit c9a863bb authored by Paul E. McKenney's avatar Paul E. McKenney

sched/membarrier: 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.
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
parent 51959d85
...@@ -210,7 +210,7 @@ static int membarrier_register_global_expedited(void) ...@@ -210,7 +210,7 @@ static int membarrier_register_global_expedited(void)
* future scheduler executions will observe the new * future scheduler executions will observe the new
* thread flag state for this mm. * thread flag state for this mm.
*/ */
synchronize_sched(); synchronize_rcu();
} }
atomic_or(MEMBARRIER_STATE_GLOBAL_EXPEDITED_READY, atomic_or(MEMBARRIER_STATE_GLOBAL_EXPEDITED_READY,
&mm->membarrier_state); &mm->membarrier_state);
...@@ -246,7 +246,7 @@ static int membarrier_register_private_expedited(int flags) ...@@ -246,7 +246,7 @@ static int membarrier_register_private_expedited(int flags)
* Ensure all future scheduler executions will observe the * Ensure all future scheduler executions will observe the
* new thread flag state for this process. * new thread flag state for this process.
*/ */
synchronize_sched(); synchronize_rcu();
} }
atomic_or(state, &mm->membarrier_state); atomic_or(state, &mm->membarrier_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment