lockdep: increase static allocations
PATCH 1/1 lockdep: increase static allocations
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
This patch doubles the limits.
--- kernel/locking/lockdep_internals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/locking/lockdep_internals.h +3 -3
@@ -54,9 +54,9 @@ enum {* table (if it's not there yet), and we check it for lock order * conflicts and deadlocks. */ -#define MAX_LOCKDEP_ENTRIES 16384UL +#define MAX_LOCKDEP_ENTRIES 32768UL -#define MAX_LOCKDEP_CHAINS_BITS 15 +#define MAX_LOCKDEP_CHAINS_BITS 16#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 524288ULextern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];
Signature · 1 line
1.8.3.2
Quoted 2 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
Doesn't that use a lot more memory? I thought lockdep preallocates.
Doubling may be too aggressive.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only
Quoted 8 lines · Andi Kleen
Quoted 2 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
Doesn't that use a lot more memory? I thought lockdep preallocates.
Doubling may be too aggressive.
The patch adds about 4MB of memory usage, I didn't think it's too much for something that is only enabled during debugging.
If this is an issue, can I suggest making these values configurable in the .config and just let users pick whatever they want?
Thanks,
Sasha
Quoted 6 lines · Sasha Levin
Quoted 5 lines · Andi Kleen
Quoted 2 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
Quoted 6 lines
Quoted 3 lines
Doesn't that use a lot more memory? I thought lockdep preallocates.
Doubling may be too aggressive.
The patch adds about 4MB of memory usage, I didn't think it's too much for something that is only enabled during debugging.
Wasting 4MB is an issue.
Linus' first Linux system had less total memory than that.
Quoted 3 lines
If this is an issue, can I suggest making these values configurable in the .config and just let users pick whatever they want?
Better allocate it at boot time, using a boot parameter or somesuch.
-Andi
Peter Zijlstra
maintainerQuoted 9 lines · Andi Kleen
Quoted 8 lines · Sasha Levin
Quoted 7 lines · Andi Kleen
Quoted 2 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
Doesn't that use a lot more memory? I thought lockdep preallocates.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Doubling may be too aggressive.
The patch adds about 4MB of memory usage, I didn't think it's too much for something that is only enabled during debugging.
Wasting 4MB is an issue.
Linus' first Linux system had less total memory than that.
Meh.. if someone from the embedded people care we can add CONFIG_BASE_SMALL option, until then I couldn't care less about 4m.
Quoted 5 lines
Quoted 3 lines
If this is an issue, can I suggest making these values configurable in the .config and just let users pick whatever they want?
Better allocate it at boot time, using a boot parameter or somesuch.
wrongbot andi is at it again.. no that's far too late.
Hi Peter,
Quoted 15 lines · Peter Zijlstra
Quoted 14 lines · Andi Kleen
Quoted 12 lines · Sasha Levin
Quoted 8 lines · Andi Kleen
Quoted 2 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
Doesn't that use a lot more memory? I thought lockdep preallocates.
Doubling may be too aggressive.
The patch adds about 4MB of memory usage, I didn't think it's too much for something that is only enabled during debugging.
Quoted 6 lines
Quoted 3 lines
Wasting 4MB is an issue.
Linus' first Linux system had less total memory than that.
Meh.. if someone from the embedded people care we can add
CONFIG_BASE_SMALLoption, until then I couldn't care less about 4m.
FYI, this could also be a problem for systems with a 16MB DMA zone for certain devices, since 4M more static kernel data can easily consume what is left of that zone, even on a system with much more memory. Is that likely to be a problem on PCs? (especially since PROVE_RCU is tied to PROVE_LOCKING in linux-next)
(I hit this on MIPS Malta after Paul McKenney's patch in linux-next to tie PROVE_RCU to PROVE_LOCKING, but luckily the devices in question actually had 32-bit DMA masks, so the MIPS arch code shouldn't have been using the __GFP_DMA flag in the first place).
Cheers
James
Quoted 13 lines
Quoted 6 lines
Quoted 4 lines
If this is an issue, can I suggest making these values configurable in the .config and just let users pick whatever they want?
Better allocate it at boot time, using a boot parameter or somesuch.
wrongbot andi is at it again.. no that's far too late.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
James Hogan
Quoted 28 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
This patch doubles the limits.
Signed-off-by Sasha Levin <[email protected]>--- kernel/locking/lockdep_internals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)kernel/locking/lockdep_internals.h +2
-2@@ -54,9 +54,9 @@ enum {* table (if it's not there yet), and we check it for lock order * conflicts and deadlocks. */ -#define MAX_LOCKDEP_ENTRIES 16384UL +#define MAX_LOCKDEP_ENTRIES 32768UL -#define MAX_LOCKDEP_CHAINS_BITS 15 +#define MAX_LOCKDEP_CHAINS_BITS 16#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
kernel/locking/lockdep_internals.h enum { · line 71
Quoted 8 lines
kernel/locking/lockdep_internals.h +1
-1@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 524288ULextern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];
Can someone pick the patch up please? PeterZ even (seemed to) acked it.
Thanks,
Sasha
Quoted 34 lines · Sasha Levin
Quoted 33 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
This patch doubles the limits.
Signed-off-by Sasha Levin <[email protected]>--- kernel/locking/lockdep_internals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)kernel/locking/lockdep_internals.h +3
-3@@ -54,9 +54,9 @@ enum {* table (if it's not there yet), and we check it for lock order * conflicts and deadlocks. */ -#define MAX_LOCKDEP_ENTRIES 16384UL +#define MAX_LOCKDEP_ENTRIES 32768UL -#define MAX_LOCKDEP_CHAINS_BITS 15 +#define MAX_LOCKDEP_CHAINS_BITS 16#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 524288UL
Quoted 6 lines
kernel/locking/lockdep_internals.h enum { · line 71
Quoted 3 lines
kernel/locking/lockdep_internals.h +0
-0extern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];Can someone pick the patch up please? PeterZ even (seemed to) acked it.
I have to do the (exact) same to rt trees, else lockdep routinely gets in a snit, takes it's cool toys and goes home.
-Mike
Quoted 34 lines · Sasha Levin
Quoted 33 lines · Sasha Levin
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
This patch doubles the limits.
Signed-off-by Sasha Levin <[email protected]>--- kernel/locking/lockdep_internals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)kernel/locking/lockdep_internals.h +3
-3@@ -54,9 +54,9 @@ enum {* table (if it's not there yet), and we check it for lock order * conflicts and deadlocks. */ -#define MAX_LOCKDEP_ENTRIES 16384UL +#define MAX_LOCKDEP_ENTRIES 32768UL -#define MAX_LOCKDEP_CHAINS_BITS 15 +#define MAX_LOCKDEP_CHAINS_BITS 16#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 524288UL
Quoted 6 lines
kernel/locking/lockdep_internals.h enum { · line 71
Quoted 3 lines
kernel/locking/lockdep_internals.h +0
-0extern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];Can someone pick the patch up please? PeterZ even (seemed to) acked it.
Pretty please? A few people reported that they do what the patch does to get lockdep working right for them, and there were no objections to the patch.
Thanks,
Sasha
Peter Zijlstra
maintainerQuoted 4 lines
Pretty please? A few people reported that they do what the patch does to get lockdep working right for them, and there were no objections to the patch.
Thanks for the reminder!, got it queued.
tip-bot for Sasha Levin
merge bot[tip:locking/core] lockdep: Increase static allocations
In reply to Sasha Levinlockdep: Increase static allocations
Commit-ID: 1413c03893332366e5b4d1e26f942ada25f3e82a Gitweb: http://git.kernel.org/tip/1413c03893332366e5b4d1e26f942ada25f3e82a Author: Sasha Levin <[email protected]> AuthorDate: Wed, 8 Jan 2014 14:21:46 -0500 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 18 Apr 2014 14:20:50 +0200
lockdep: Increase static allocations
Fuzzing a recent kernel with a large configuration hits the static allocation limits and disables lockdep.
This patch doubles the limits.
--- kernel/locking/lockdep_internals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/locking/lockdep_internals.h +3 -3
@@ -54,9 +54,9 @@ enum {* table (if it's not there yet), and we check it for lock order * conflicts and deadlocks. */ -#define MAX_LOCKDEP_ENTRIES 16384UL +#define MAX_LOCKDEP_ENTRIES 32768UL -#define MAX_LOCKDEP_CHAINS_BITS 15 +#define MAX_LOCKDEP_CHAINS_BITS 16#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)#define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 524288ULextern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];