[RFC][PATCH 0/4] locking: Add/convert context analysis bits

From: Peter Zijlstra

Date: Wed Jan 21 2026 - 06:30:25 EST


Hai

This is on top of tip/locking/core with these patches on:

https://lkml.kernel.org/r/20260119094029.1344361-1-elver@xxxxxxxxxx

and converts mutex, rtmutex, ww_mutex and futex to use the new context analysis
bits.

There is one snafu:

ww_mutex_set_context_fastpath()'s data_race() usage doesn't stop the compiler
from complaining when building a defconfig+PREEMPT_RT+LOCKDEP build:

../kernel/locking/ww_mutex.h:439:24: error: calling function '__ww_mutex_has_waiters' requires holding raw_spinlock 'lock->base.rtmutex.wait_lock' exclusively [-Werror,-Wthread-safety-analysis]
439 | if (likely(!data_race(__ww_mutex_has_waiters(&lock->base))))
| ^
1 error generated.