WSL2-Linux-Kernel/kernel/locking
John Stultz c5c385baee locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers
commit 92cc5d00a4 upstream.

Apparently despite it being marked inline, the compiler
may not inline __down_read_common() which makes it difficult
to identify the cause of lock contention, as the blocked
function in traceevents will always be listed as
__down_read_common().

So this patch adds __always_inline annotation to the common
function (as well as the inlined helper callers) to force it to
be inlined so the blocking function will be listed (via Wchan)
in traceevents.

Fixes: c995e638cc ("locking/rwsem: Fold __down_{read,write}*()")
Reported-by: Tim Murray <timmurray@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Waiman Long <longman@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20230503023351.2832796-1-jstultz@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-17 11:50:29 +02:00
..
Makefile
irqflag-debug.c
lock_events.c
lock_events.h
lock_events_list.h
lockdep.c
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
locktorture.c
mcs_spinlock.h
mutex-debug.c
mutex.c
mutex.h
osq_lock.c
percpu-rwsem.c
qrwlock.c
qspinlock.c
qspinlock_paravirt.h
qspinlock_stat.h
rtmutex.c rtmutex: Add acquire semantics for rtmutex lock acquisition slow path 2023-04-26 13:51:51 +02:00
rtmutex_api.c rtmutex: Add acquire semantics for rtmutex lock acquisition slow path 2023-04-26 13:51:51 +02:00
rtmutex_common.h
rwbase_rt.c
rwsem.c locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers 2023-05-17 11:50:29 +02:00
semaphore.c
spinlock.c
spinlock_debug.c
spinlock_rt.c
test-ww_mutex.c
ww_mutex.h
ww_rt_mutex.c