Skip to content

RFC locking: Add/convert context analysis bits

Peter Zijlstra lkml llvm 1 version Applied

Status from this message: The following commit has been merged into the locking/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 21 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4compiler-context-analysys: Add __cond_releases()include/linux/compiler-context-analysis.h+32 -05 replies
2/4locking/mutex: Add context analysisinclude/linux/mutex_types.h kernel/locking/Makefile kernel/locking/mutex.c +2 more+53 -62 replies
3/4locking/rtmutex: Add context analysisinclude/linux/mutex.h include/linux/rtmutex.h kernel/locking/Makefile +6 more+55 -172 replies
4/4futex: Convert to compiler context analysiskernel/futex/Makefile kernel/futex/core.c kernel/futex/futex.h +2 more+35 -61 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchMarco Elver
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

Hai

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

https://lkml.kernel.org/r/[email protected]

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.