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.

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: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lkml.kernel.org/r/20210811025920.20751-1-zhouzhouyi@gmail.com

authored by

Zhouyi Zhou and committed by
Peter Zijlstra
a2e05ddd 2507003a

+4 -4
+1 -1
include/linux/lockdep_types.h
··· 21 21 LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */ 22 22 23 23 #ifdef CONFIG_PROVE_RAW_LOCK_NESTING 24 - LD_WAIT_CONFIG, /* CONFIG_PREEMPT_LOCK, spinlock_t etc.. */ 24 + LD_WAIT_CONFIG, /* preemptible in PREEMPT_RT, spinlock_t etc.. */ 25 25 #else 26 26 LD_WAIT_CONFIG = LD_WAIT_SPIN, 27 27 #endif
+1 -1
kernel/locking/lockdep.c
··· 4671 4671 /* 4672 4672 * Verify the wait_type context. 4673 4673 * 4674 - * This check validates we takes locks in the right wait-type order; that is it 4674 + * This check validates we take locks in the right wait-type order; that is it 4675 4675 * ensures that we do not take mutexes inside spinlocks and do not attempt to 4676 4676 * acquire spinlocks inside raw_spinlocks and the sort. 4677 4677 *
+2 -2
kernel/rcu/update.c
··· 247 247 .name = "rcu_read_lock", 248 248 .key = &rcu_lock_key, 249 249 .wait_type_outer = LD_WAIT_FREE, 250 - .wait_type_inner = LD_WAIT_CONFIG, /* XXX PREEMPT_RCU ? */ 250 + .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT implies PREEMPT_RCU */ 251 251 }; 252 252 EXPORT_SYMBOL_GPL(rcu_lock_map); 253 253 ··· 256 256 .name = "rcu_read_lock_bh", 257 257 .key = &rcu_bh_lock_key, 258 258 .wait_type_outer = LD_WAIT_FREE, 259 - .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_LOCK also makes BH preemptible */ 259 + .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */ 260 260 }; 261 261 EXPORT_SYMBOL_GPL(rcu_bh_lock_map); 262 262