10.3.3.3 Where Can RCU's APIs Be Used?

Figure: RCU API Usage Constraints
\resizebox{3in}{!}{\includegraphics{defer/RCUenvAPI}}

Figure [*] shows which APIs may be used in which in-kernel environments. The RCU read-side primitives may be used in any environment, including NMI, the RCU mutation and asynchronous grace-period primitives may be used in any environment other than NMI, and, finally, the RCU synchronous grace-period primitives may be used only in process context. The RCU list-traversal primitives include list_for_each_entry_rcu(), hlist_for_each_entry_rcu(), etc. Similarly, the RCU list-mutation primitives include list_add_rcu(), hlist_del_rcu(), etc.

Note that primitives from other families of RCU may be substituted, for example, srcu_read_lock() may be used in any context in which rcu_read_lock() may be used.



Paul E. McKenney 2011-12-16