The branch stable/13 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=6ba3ceaeb51052ae9a39a597d81c49691ecdc78f
commit 6ba3ceaeb51052ae9a39a597d81c49691ecdc78f Author: Vladimir Kondratyev <[email protected]> AuthorDate: 2021-07-05 00:19:50 +0000 Commit: Vladimir Kondratyev <[email protected]> CommitDate: 2021-07-20 22:43:52 +0000 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 Differential revision: https://reviews.freebsd.org/D30809 (cherry picked from commit 1ab61a193241f832e63f97ca37880b010469cb38) --- sys/compat/linuxkpi/common/src/linux_rcu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_rcu.c b/sys/compat/linuxkpi/common/src/linux_rcu.c index a39949cf5013..2179faa2c05e 100644 --- a/sys/compat/linuxkpi/common/src/linux_rcu.c +++ b/sys/compat/linuxkpi/common/src/linux_rcu.c @@ -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 */ _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
