Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU and LKMM commits from Paul E. McKenney: - An LKMM commit adding support for synchronize_srcu_expedited() - A couple of straggling RCU flavor consolidation updates - Documentation updates. - Miscellaneous fixes - SRCU updates - RCU CPU stall-warning updates - Torture-test updates Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -878,9 +878,11 @@ static inline void rcu_head_init(struct rcu_head *rhp)
|
||||
static inline bool
|
||||
rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f)
|
||||
{
|
||||
if (READ_ONCE(rhp->func) == f)
|
||||
rcu_callback_t func = READ_ONCE(rhp->func);
|
||||
|
||||
if (func == f)
|
||||
return true;
|
||||
WARN_ON_ONCE(READ_ONCE(rhp->func) != (rcu_callback_t)~0L);
|
||||
WARN_ON_ONCE(func != (rcu_callback_t)~0L);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -56,45 +56,11 @@ struct srcu_struct { };
|
||||
|
||||
void call_srcu(struct srcu_struct *ssp, struct rcu_head *head,
|
||||
void (*func)(struct rcu_head *head));
|
||||
void _cleanup_srcu_struct(struct srcu_struct *ssp, bool quiesced);
|
||||
void cleanup_srcu_struct(struct srcu_struct *ssp);
|
||||
int __srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp);
|
||||
void __srcu_read_unlock(struct srcu_struct *ssp, int idx) __releases(ssp);
|
||||
void synchronize_srcu(struct srcu_struct *ssp);
|
||||
|
||||
/**
|
||||
* cleanup_srcu_struct - deconstruct a sleep-RCU structure
|
||||
* @ssp: structure to clean up.
|
||||
*
|
||||
* Must invoke this after you are finished using a given srcu_struct that
|
||||
* was initialized via init_srcu_struct(), else you leak memory.
|
||||
*/
|
||||
static inline void cleanup_srcu_struct(struct srcu_struct *ssp)
|
||||
{
|
||||
_cleanup_srcu_struct(ssp, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* cleanup_srcu_struct_quiesced - deconstruct a quiesced sleep-RCU structure
|
||||
* @ssp: structure to clean up.
|
||||
*
|
||||
* Must invoke this after you are finished using a given srcu_struct that
|
||||
* was initialized via init_srcu_struct(), else you leak memory. Also,
|
||||
* all grace-period processing must have completed.
|
||||
*
|
||||
* "Completed" means that the last synchronize_srcu() and
|
||||
* synchronize_srcu_expedited() calls must have returned before the call
|
||||
* to cleanup_srcu_struct_quiesced(). It also means that the callback
|
||||
* from the last call_srcu() must have been invoked before the call to
|
||||
* cleanup_srcu_struct_quiesced(), but you can use srcu_barrier() to help
|
||||
* with this last. Violating these rules will get you a WARN_ON() splat
|
||||
* (with high probability, anyway), and will also cause the srcu_struct
|
||||
* to be leaked.
|
||||
*/
|
||||
static inline void cleanup_srcu_struct_quiesced(struct srcu_struct *ssp)
|
||||
{
|
||||
_cleanup_srcu_struct(ssp, true);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user