Provide rcu_expedite_gp() and rcu_unexpedite_gp()
RFC PATCH 1/1 Provide rcu_expedite_gp() and rcu_unexpedite_gp()
Currently, expediting of normal synchronous grace-period primitives (synchronize_rcu() and friends) is controlled by the rcu_expedited() boot/sysfs parameter. This works well, but does not handle nesting. This commit therefore provides rcu_expedite_gp() to enable expediting and rcu_unexpedite_gp() to cancel a prior rcu_expedite_gp(), both of which support nesting.
Signed-off-by Paul E. McKenney <[email protected]>
include/linux/rcupdate.h +20 -0
@@ -48,6 +48,26 @@extern int rcu_expedited;/* for sysctl */ +#ifdef CONFIG_TINY_RCU +/* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */ +static inline bool rcu_gp_is_expedited (void )/* Internal RCU use. */ +{ +return false; +} + +static inline void rcu_expedite_gp (void ) +{ +} + +static inline void rcu_unexpedite_gp (void ) +{ +} +#else /* #ifdef CONFIG_TINY_RCU */ +bool rcu_gp_is_expedited (void );/* Internal RCU use. */ +void rcu_expedite_gp (void ); +void rcu_unexpedite_gp (void ); +#endif /* #else #ifdef CONFIG_TINY_RCU */ +enum rcutorture_type {RCU_FLAVOR ,RCU_BH_FLAVOR ,
kernel/rcu/update.c +48 -0
54 lines not on this page · raw message