Commit ffc766b3 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'tomoyo-pr-20210426' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1

Pull lockdep capacity limit updates from Tetsuo Handa:
 "syzbot is occasionally reporting that fuzz testing is terminated due
  to hitting upper limits lockdep can track.

  Analysis via /proc/lockdep* did not show any obvious culprits, allow
  tuning tracing capacity constants"

* tag 'tomoyo-pr-20210426' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1:
  lockdep: Allow tuning tracing capacity constants.
parents b0e22b47 5dc33592
...@@ -1393,7 +1393,7 @@ static int add_lock_to_list(struct lock_class *this, ...@@ -1393,7 +1393,7 @@ static int add_lock_to_list(struct lock_class *this,
/* /*
* For good efficiency of modular, we use power of 2 * For good efficiency of modular, we use power of 2
*/ */
#define MAX_CIRCULAR_QUEUE_SIZE 4096UL #define MAX_CIRCULAR_QUEUE_SIZE (1UL << CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS)
#define CQ_MASK (MAX_CIRCULAR_QUEUE_SIZE-1) #define CQ_MASK (MAX_CIRCULAR_QUEUE_SIZE-1)
/* /*
......
...@@ -99,16 +99,16 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ = ...@@ -99,16 +99,16 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_STACK_TRACE_ENTRIES 262144UL #define MAX_STACK_TRACE_ENTRIES 262144UL
#define STACK_TRACE_HASH_SIZE 8192 #define STACK_TRACE_HASH_SIZE 8192
#else #else
#define MAX_LOCKDEP_ENTRIES 32768UL #define MAX_LOCKDEP_ENTRIES (1UL << CONFIG_LOCKDEP_BITS)
#define MAX_LOCKDEP_CHAINS_BITS 16 #define MAX_LOCKDEP_CHAINS_BITS CONFIG_LOCKDEP_CHAINS_BITS
/* /*
* Stack-trace: tightly packed array of stack backtrace * Stack-trace: tightly packed array of stack backtrace
* addresses. Protected by the hash_lock. * addresses. Protected by the hash_lock.
*/ */
#define MAX_STACK_TRACE_ENTRIES 524288UL #define MAX_STACK_TRACE_ENTRIES (1UL << CONFIG_LOCKDEP_STACK_TRACE_BITS)
#define STACK_TRACE_HASH_SIZE 16384 #define STACK_TRACE_HASH_SIZE (1 << CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS)
#endif #endif
/* /*
......
...@@ -1370,6 +1370,46 @@ config LOCKDEP ...@@ -1370,6 +1370,46 @@ config LOCKDEP
config LOCKDEP_SMALL config LOCKDEP_SMALL
bool bool
config LOCKDEP_BITS
int "Bitsize for MAX_LOCKDEP_ENTRIES"
depends on LOCKDEP && !LOCKDEP_SMALL
range 10 30
default 15
help
Try increasing this value if you hit "BUG: MAX_LOCKDEP_ENTRIES too low!" message.
config LOCKDEP_CHAINS_BITS
int "Bitsize for MAX_LOCKDEP_CHAINS"
depends on LOCKDEP && !LOCKDEP_SMALL
range 10 30
default 16
help
Try increasing this value if you hit "BUG: MAX_LOCKDEP_CHAINS too low!" message.
config LOCKDEP_STACK_TRACE_BITS
int "Bitsize for MAX_STACK_TRACE_ENTRIES"
depends on LOCKDEP && !LOCKDEP_SMALL
range 10 30
default 19
help
Try increasing this value if you hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" message.
config LOCKDEP_STACK_TRACE_HASH_BITS
int "Bitsize for STACK_TRACE_HASH_SIZE"
depends on LOCKDEP && !LOCKDEP_SMALL
range 10 30
default 14
help
Try increasing this value if you need large MAX_STACK_TRACE_ENTRIES.
config LOCKDEP_CIRCULAR_QUEUE_BITS
int "Bitsize for elements in circular_queue struct"
depends on LOCKDEP
range 10 30
default 12
help
Try increasing this value if you hit "lockdep bfs error:-1" warning due to __cq_enqueue() failure.
config DEBUG_LOCKDEP config DEBUG_LOCKDEP
bool "Lock dependency engine debugging" bool "Lock dependency engine debugging"
depends on DEBUG_KERNEL && LOCKDEP depends on DEBUG_KERNEL && LOCKDEP
......
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