On Wed, May 03, 2023 at 02:33:51AM +0000, John Stultz wrote:
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.
Cc: Minchan Kim minchan@kernel.org Cc: Tim Murray timmurray@google.com Cc: Peter Zijlstra peterz@infradead.org Cc: Ingo Molnar mingo@redhat.com Cc: Will Deacon will@kernel.org Cc: Waiman Long longman@redhat.com Cc: Boqun Feng boqun.feng@gmail.com Cc: kernel-team@android.com Cc: stable@vger.kernel.org Fixes: c995e638ccbb ("locking/rwsem: Fold __down_{read,write}*()") Reviewed-by: Waiman Long longman@redhat.com Reported-by: Tim Murray timmurray@google.com Signed-off-by: John Stultz jstultz@google.com
Thanks!