diff options
| author | Waiman Long <[email protected]> | 2018-10-19 01:45:18 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2018-10-19 05:53:18 +0000 |
| commit | 01a14bda11add9dcd4a59200f13834d634559935 (patch) | |
| tree | c7fc12f5c710502f98bdb917d3eaf9da0943b000 /lib/debug_locks.c | |
| parent | locking/lockdep: Fix debug_locks off performance problem (diff) | |
| download | kernel-01a14bda11add9dcd4a59200f13834d634559935.tar.gz kernel-01a14bda11add9dcd4a59200f13834d634559935.zip | |
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 <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/debug_locks.c')
| -rw-r--r-- | lib/debug_locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/debug_locks.c b/lib/debug_locks.c index 124fdf238b3d..ce51749cc145 100644 --- a/lib/debug_locks.c +++ b/lib/debug_locks.c @@ -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); /* |
