Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rcu-tasks: Document that RCU Tasks Trace grace periods now imply RCU grace periods

Now that RCU Tasks Trace is implemented in terms of SRCU-fast, the fact
that each SRCU-fast grace period implies at least two RCU grace periods
in turn means that each RCU Tasks Trace grace period implies at least
two grace periods. This commit therefore updates the documentation
accordingly.

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

authored by

Paul E. McKenney and committed by
Joel Fernandes
ad6ef775 49689070

+10 -6
+7
Documentation/RCU/Design/Requirements/Requirements.rst
··· 2787 2787 that apply noinstr to kernel entry/exit code (or that build with 2788 2788 ``CONFIG_TASKS_TRACE_RCU_NO_MB=y``. 2789 2789 2790 + Now that the implementation is based on SRCU-fast, a call 2791 + to synchronize_rcu_tasks_trace() implies at least one call to 2792 + synchronize_rcu(), that is, every Tasks Trace RCU grace period contains 2793 + at least one plain vanilla RCU grace period. Should there ever 2794 + be a synchronize_rcu_tasks_trace_expedited(), this guarantee would 2795 + *not* necessarily apply to this hypothetical API member. 2796 + 2790 2797 The tasks-trace-RCU API is also reasonably compact, 2791 2798 consisting of rcu_read_lock_trace(), rcu_read_unlock_trace(), 2792 2799 rcu_read_lock_trace_held(), call_rcu_tasks_trace(),
+3 -6
include/linux/rcupdate.h
··· 208 208 /** 209 209 * rcu_trace_implies_rcu_gp - does an RCU Tasks Trace grace period imply an RCU grace period? 210 210 * 211 - * As an accident of implementation, an RCU Tasks Trace grace period also 212 - * acts as an RCU grace period. However, this could change at any time. 213 - * Code relying on this accident must call this function to verify that 214 - * this accident is still happening. 215 - * 216 - * You have been warned! 211 + * Now that RCU Tasks Trace is implemented in terms of SRCU-fast, a 212 + * call to synchronize_rcu_tasks_trace() is guaranteed to imply at least 213 + * one call to synchronize_rcu(). 217 214 */ 218 215 static inline bool rcu_trace_implies_rcu_gp(void) { return true; } 219 216