mirror of https://gitee.com/openkylin/linux.git
locking/lockdep: Make global debug_locks* variables read-mostly
Make the frequently used lockdep global variable debug_locks read-mostly. As debug_locks_silent is sometime used together with debug_locks, it is also made read-mostly so that they can be close together. With false cacheline sharing, cacheline contention problem can happen depending on what get put into the same cacheline as debug_locks. Signed-off-by: Waiman Long <longman@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Link: http://lkml.kernel.org/r/1539913518-15598-2-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
9506a7425b
commit
01a14bda11
|
@ -8,8 +8,8 @@
|
|||
|
||||
struct task_struct;
|
||||
|
||||
extern int debug_locks;
|
||||
extern int debug_locks_silent;
|
||||
extern int debug_locks __read_mostly;
|
||||
extern int debug_locks_silent __read_mostly;
|
||||
|
||||
|
||||
static inline int __debug_locks_off(void)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* that would just muddy the log. So we report the first one and
|
||||
* shut up after that.
|
||||
*/
|
||||
int debug_locks = 1;
|
||||
int debug_locks __read_mostly = 1;
|
||||
EXPORT_SYMBOL_GPL(debug_locks);
|
||||
|
||||
/*
|
||||
|
@ -29,7 +29,7 @@ EXPORT_SYMBOL_GPL(debug_locks);
|
|||
* 'silent failure': nothing is printed to the console when
|
||||
* a locking bug is detected.
|
||||
*/
|
||||
int debug_locks_silent;
|
||||
int debug_locks_silent __read_mostly;
|
||||
EXPORT_SYMBOL_GPL(debug_locks_silent);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue