sched/membarrier: 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, the synchronize_sched() in sys_membarrier() can be replaced by synchronize_rcu(). This commit therefore makes this change. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This commit is contained in:
parent
d3ff3891b2
commit
78d125d338
|
@ -298,7 +298,7 @@ SYSCALL_DEFINE2(membarrier, int, cmd, int, flags)
|
||||||
if (tick_nohz_full_enabled())
|
if (tick_nohz_full_enabled())
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (num_online_cpus() > 1)
|
if (num_online_cpus() > 1)
|
||||||
synchronize_sched();
|
synchronize_rcu();
|
||||||
return 0;
|
return 0;
|
||||||
case MEMBARRIER_CMD_GLOBAL_EXPEDITED:
|
case MEMBARRIER_CMD_GLOBAL_EXPEDITED:
|
||||||
return membarrier_global_expedited();
|
return membarrier_global_expedited();
|
||||||
|
|
Loading…
Reference in New Issue