Files
kernel-tenderloin-3.0/include/linux
Peter Zijlstra 1f8a6a10fb ring-buffer: pass in lockdep class key for reader_lock
On Sun, 7 Jun 2009, Ingo Molnar wrote:
> Testing tracer sched_switch: <6>Starting ring buffer hammer
> PASSED
> Testing tracer sysprof: PASSED
> Testing tracer function: PASSED
> Testing tracer irqsoff:
> =============================================
> PASSED
> Testing tracer preemptoff: PASSED
> Testing tracer preemptirqsoff: [ INFO: possible recursive locking detected ]
> PASSED
> Testing tracer branch: 2.6.30-rc8-tip-01972-ge5b9078-dirty #5760
> ---------------------------------------------
> rb_consumer/431 is trying to acquire lock:
>  (&cpu_buffer->reader_lock){......}, at: [<c109eef7>] ring_buffer_reset_cpu+0x37/0x70
>
> but task is already holding lock:
>  (&cpu_buffer->reader_lock){......}, at: [<c10a019e>] ring_buffer_consume+0x7e/0xc0
>
> other info that might help us debug this:
> 1 lock held by rb_consumer/431:
>  #0:  (&cpu_buffer->reader_lock){......}, at: [<c10a019e>] ring_buffer_consume+0x7e/0xc0

The ring buffer is a generic structure, and can be used outside of
ftrace. If ftrace traces within the use of the ring buffer, it can produce
false positives with lockdep.

This patch passes in a static lock key into the allocation of the ring
buffer, so that different ring buffers will have their own lock class.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1244477919.13761.9042.camel@twins>

[ store key in ring buffer descriptor ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-06-08 18:50:20 -04:00
..
2009-04-07 10:23:34 +01:00
2009-03-18 19:45:11 -07:00
2009-03-31 09:56:26 +01:00
2009-03-05 14:39:32 -05:00
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
2009-05-02 15:36:10 -07:00
2009-04-22 08:35:10 +02:00
2009-04-23 10:06:35 +01:00
2009-05-06 14:13:00 +02:00
2009-04-03 14:53:32 -07:00
2009-03-27 14:43:59 -04:00
2009-04-03 14:53:32 -07:00
2009-03-16 08:32:27 -06:00
2009-03-30 15:14:53 +02:00
2009-04-03 09:48:29 -07:00
2009-04-08 14:13:03 +02:00
2009-04-02 19:04:53 -07:00
2009-04-21 13:41:48 -07:00
2009-04-21 13:41:48 -07:00
2009-05-09 10:49:41 -04:00
2009-04-06 16:06:26 +01:00
2009-04-01 08:59:17 -07:00
2009-04-07 08:12:38 +02:00
2009-04-02 19:04:48 -07:00
2009-04-24 10:18:52 +02:00
2009-03-26 10:56:35 -07:00
2009-03-20 10:48:14 -07:00
2009-03-15 19:59:13 -07:00
2009-04-03 17:41:23 -07:00
2009-04-01 13:28:15 -04:00
2009-04-03 17:41:12 -07:00
2009-03-10 20:33:18 -04:00
2009-04-30 15:32:11 +00:00
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:13 -07:00
2009-04-13 15:04:32 -07:00
2009-04-13 14:51:23 -07:00
2009-04-24 08:54:21 +02:00
2009-04-01 08:59:13 -07:00
2009-03-13 16:09:12 -07:00
2009-03-30 15:22:01 +02:00
2009-03-26 02:18:35 +01:00
2009-03-30 14:28:58 -07:00
2009-05-09 10:49:41 -04:00
2009-04-01 08:59:24 -07:00
2009-04-08 14:33:38 -07:00
2009-04-13 15:04:29 -07:00
2009-04-21 19:40:00 -07:00
2009-03-27 12:18:56 -04:00
2009-04-01 08:59:15 -07:00
2009-04-02 19:05:01 -07:00
2009-04-20 12:59:29 -04:00
2009-03-26 18:14:21 +01:00
2009-04-17 10:50:27 -07:00