Commit a2e05ddd authored by Zhouyi Zhou's avatar Zhouyi Zhou Committed by Peter Zijlstra

lockdep: Improve comments in wait-type checks

Comments in wait-type checks be improved by mentioning the
PREEPT_RT kernel configure option.
Signed-off-by: default avatarZhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Link: https://lkml.kernel.org/r/20210811025920.20751-1-zhouzhouyi@gmail.com
parent 2507003a
...@@ -21,7 +21,7 @@ enum lockdep_wait_type { ...@@ -21,7 +21,7 @@ enum lockdep_wait_type {
LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */ LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */
#ifdef CONFIG_PROVE_RAW_LOCK_NESTING #ifdef CONFIG_PROVE_RAW_LOCK_NESTING
LD_WAIT_CONFIG, /* CONFIG_PREEMPT_LOCK, spinlock_t etc.. */ LD_WAIT_CONFIG, /* preemptible in PREEMPT_RT, spinlock_t etc.. */
#else #else
LD_WAIT_CONFIG = LD_WAIT_SPIN, LD_WAIT_CONFIG = LD_WAIT_SPIN,
#endif #endif
......
...@@ -4671,7 +4671,7 @@ print_lock_invalid_wait_context(struct task_struct *curr, ...@@ -4671,7 +4671,7 @@ print_lock_invalid_wait_context(struct task_struct *curr,
/* /*
* Verify the wait_type context. * Verify the wait_type context.
* *
* This check validates we takes locks in the right wait-type order; that is it * This check validates we take locks in the right wait-type order; that is it
* ensures that we do not take mutexes inside spinlocks and do not attempt to * ensures that we do not take mutexes inside spinlocks and do not attempt to
* acquire spinlocks inside raw_spinlocks and the sort. * acquire spinlocks inside raw_spinlocks and the sort.
* *
......
...@@ -247,7 +247,7 @@ struct lockdep_map rcu_lock_map = { ...@@ -247,7 +247,7 @@ struct lockdep_map rcu_lock_map = {
.name = "rcu_read_lock", .name = "rcu_read_lock",
.key = &rcu_lock_key, .key = &rcu_lock_key,
.wait_type_outer = LD_WAIT_FREE, .wait_type_outer = LD_WAIT_FREE,
.wait_type_inner = LD_WAIT_CONFIG, /* XXX PREEMPT_RCU ? */ .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT implies PREEMPT_RCU */
}; };
EXPORT_SYMBOL_GPL(rcu_lock_map); EXPORT_SYMBOL_GPL(rcu_lock_map);
...@@ -256,7 +256,7 @@ struct lockdep_map rcu_bh_lock_map = { ...@@ -256,7 +256,7 @@ struct lockdep_map rcu_bh_lock_map = {
.name = "rcu_read_lock_bh", .name = "rcu_read_lock_bh",
.key = &rcu_bh_lock_key, .key = &rcu_bh_lock_key,
.wait_type_outer = LD_WAIT_FREE, .wait_type_outer = LD_WAIT_FREE,
.wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_LOCK also makes BH preemptible */ .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */
}; };
EXPORT_SYMBOL_GPL(rcu_bh_lock_map); EXPORT_SYMBOL_GPL(rcu_bh_lock_map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment