lockdep: improve comments in wait-type checks
Subsystems (2)
RFC PATCH v2 1/1 lockdep: improve comments in wait-type checks
comments in wait-type checks be improved by mentioning the PREEPT_RT kernel configure option.
Many thanks
Zhouyi
--- include/linux/lockdep_types.h | 2 +- kernel/locking/lockdep.c | 2 +- kernel/rcu/update.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
include/linux/lockdep_types.h +1 -1
@@ -21,7 +21,7 @@ enum lockdep_wait_type { LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */#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 LD_WAIT_CONFIG = LD_WAIT_SPIN,#endif
kernel/locking/lockdep.c +1 -1
@@ -4671,7 +4671,7 @@ print_lock_invalid_wait_context(struct task_struct *curr,/* * 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 * acquire spinlocks inside raw_spinlocks and the sort. *
kernel/rcu/update.c +2 -2
@@ -247,7 +247,7 @@ struct lockdep_map rcu_lock_map = { .name = "rcu_read_lock", .key = &rcu_lock_key, .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);
@@ -256,7 +256,7 @@ struct lockdep_map rcu_bh_lock_map = { .name = "rcu_read_lock_bh", .key = &rcu_bh_lock_key, .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);
Signature · 1 line
2.25.1
Peter Zijlstra
maintainerQuoted 8 lines · Zhouyi Zhou
comments in wait-type checks be improved by mentioning the
PREEPT_RTkernel configure option.Many thanks
ZhouyiAcked-by Paul E. McKenney <[email protected]>Signed-off-by Zhouyi Zhou <[email protected]>
Acked goes after sobs, fixed that for you.
Thanks!
Quoted 8 lines · Peter Zijlstra
Quoted 6 lines · Zhouyi Zhou
comments in wait-type checks be improved by mentioning the
PREEPT_RTkernel configure option.Many thanks
Zhouyi
Quoted 6 lines
Quoted 2 lines
Acked-by Paul E. McKenney <[email protected]>Signed-off-by Zhouyi Zhou <[email protected]>Acked goes after sobs, fixed that for you.
Thanks!
Sincere thanks for your help and guidance
Zhouyi ;-)
[tip: locking/core] lockdep: Improve comments in wait-type checks
In reply to Zhouyi ZhouThe following commit has been merged into the locking/core branch of tip:
The following commit has been merged into the locking/core branch of tip:
Commit-ID: a2e05ddda11b0bd529f443df9089ab498b2c2642 Gitweb: https://git.kernel.org/tip/a2e05ddda11b0bd529f443df9089ab498b2c2642 Author: Zhouyi Zhou <[email protected]> AuthorDate: Wed, 11 Aug 2021 10:59:20 +08:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Fri, 17 Sep 2021 15:08:45 +02:00
lockdep: Improve comments in wait-type checks
Comments in wait-type checks be improved by mentioning the PREEPT_RT kernel configure option.
--- include/linux/lockdep_types.h | 2 +- kernel/locking/lockdep.c | 2 +- kernel/rcu/update.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
include/linux/lockdep_types.h +1 -1
@@ -21,7 +21,7 @@ enum lockdep_wait_type { LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */#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 LD_WAIT_CONFIG = LD_WAIT_SPIN,#endif
kernel/locking/lockdep.c +1 -1
@@ -4671,7 +4671,7 @@ print_lock_invalid_wait_context(struct task_struct *curr,/* * 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 * acquire spinlocks inside raw_spinlocks and the sort. *
kernel/rcu/update.c +2 -2
@@ -247,7 +247,7 @@ struct lockdep_map rcu_lock_map = { .name = "rcu_read_lock", .key = &rcu_lock_key, .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);
@@ -256,7 +256,7 @@ struct lockdep_map rcu_bh_lock_map = { .name = "rcu_read_lock_bh", .key = &rcu_bh_lock_key, .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);