OSDN Git Service

blktrace: switch trace spinlock to a raw spinlock
authorWander Lairson Costa <wander@redhat.com>
Mon, 20 Dec 2021 19:28:27 +0000 (16:28 -0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Dec 2021 20:50:14 +0000 (13:50 -0700)
commit361c81dbc58c8aa230e1f2d556045fa7bc3eb4a3
treece8ee18c100f6ddaedfb01f8da170c7d958dd591
parent5ef1630586317e92c9ebd7b4ce48f393b7ff790f
blktrace: switch trace spinlock to a raw spinlock

The running_trace_lock protects running_trace_list and is acquired
within the tracepoint which implies disabled preemption. The spinlock_t
typed lock can not be acquired with disabled preemption on PREEMPT_RT
because it becomes a sleeping lock.
The runtime of the tracepoint depends on the number of entries in
running_trace_list and has no limit. The blk-tracer is considered debug
code and higher latencies here are okay.

Make running_trace_lock a raw_spinlock_t.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20211220192827.38297-1-wander@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
kernel/trace/blktrace.c