locking/mutex: Make contention tracepoints more consistent wrt adaptive spinning
authorPeter Zijlstra <peterz@infradead.org>
Wed, 30 Mar 2022 11:06:54 +0000 (13:06 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Apr 2022 08:24:36 +0000 (10:24 +0200)
commitdc1f7893a70fe403983bd8492f177bf993940e2c
tree0601a9c8f14c338fbae6755284036b50e98501d1
parentee042be16cb455116d0fe99b77c6bc8baf87c8c6
locking/mutex: Make contention tracepoints more consistent wrt adaptive spinning

Have the trace_contention_*() tracepoints consistently include
adaptive spinning. In order to differentiate between the spinning and
non-spinning states add LCB_F_MUTEX and combine with LCB_F_SPIN.

The consequence is that a mutex contention can now triggler multiple
_begin() tracepoints before triggering an _end().

Additionally, this fixes one path where mutex would trigger _end()
without ever seeing a _begin().

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
include/trace/events/lock.h
kernel/locking/mutex.c