LinuxKPI: Do not wait for a grace period in rcu_barrier()
Linux docs explicitly state that this is not required [1]: "Important note: The rcu_barrier() function is not, repeat, not, obligated to wait for a grace period. It is instead only required to wait for RCU callbacks that have already been posted. Therefore, if there are no RCU callbacks posted anywhere in the system, rcu_barrier() is within its rights to return immediately. Even if there are callbacks posted, rcu_barrier() does not necessarily need to wait for a grace period." [1] https://www.kernel.org/doc/Documentation/RCU/Design/Requirements/Requirements.html Reviewed by: emaste, hselasky, manu MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30809
This commit is contained in:
parent
c0862b2b1f
commit
1ab61a1932
@ -367,8 +367,12 @@ linux_rcu_barrier(unsigned type)
|
||||
|
||||
MPASS(type < RCU_TYPE_MAX);
|
||||
|
||||
linux_synchronize_rcu(type);
|
||||
|
||||
/*
|
||||
* This function is not obligated to wait for a grace period.
|
||||
* It only waits for RCU callbacks that have already been posted.
|
||||
* If there are no RCU callbacks posted, rcu_barrier() can return
|
||||
* immediately.
|
||||
*/
|
||||
head = &linux_epoch_head[type];
|
||||
|
||||
/* wait for callbacks to complete */
|
||||
|
Loading…
Reference in New Issue
Block a user