Skip to content

Commit

Permalink
dma-debug: Put all hash-chain locks into the same lock class
Browse files Browse the repository at this point in the history
Alan Cox reported that lockdep runs out of its stack-trace entries
with certain configs:

 BUG: MAX_STACK_TRACE_ENTRIES too low

This happens because there are 1024 hash buckets, each with a
separate lock. Lockdep puts each lock into a separate lock class and
tracks them independently.

But in reality we never take more than one of the buckets, so they
really belong into a single lock-class. Annotate the has bucket lock
init accordingly.

[ Impact: reduce the lockdep footprint of dma-debug ]

Reported-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Ingo Molnar authored and Joerg Roedel committed Jun 17, 2009
1 parent c79ee4e commit b0a5b83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dma-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ void dma_debug_init(u32 num_entries)

for (i = 0; i < HASH_SIZE; ++i) {
INIT_LIST_HEAD(&dma_entry_hash[i].list);
dma_entry_hash[i].lock = SPIN_LOCK_UNLOCKED;
spin_lock_init(&dma_entry_hash[i].lock);
}

if (dma_debug_fs_init() != 0) {
Expand Down

0 comments on commit b0a5b83

Please sign in to comment.