Skip to content

mutex subsystem, -V4

Ingo Molnar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 65 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9mutex subsystem, add atomic_cmpxchg() to all archesinclude/asm-alpha/atomic.h include/asm-arm/atomic.h include/asm-arm26/atomic.h +19 more+29 -00 replies
2/9mutex subsystem, add atomic_*_call_if_*() to i386include/asm-i386/atomic.h+57 -00 replies
3/9mutex subsystem, add atomic_*_call_if_*() to x86_64include/asm-x86_64/atomic.h+58 -00 replies
4/9mutex subsystem, add atomic_*_call_if_*() defaults to the remaining archesinclude/asm-alpha/atomic.h include/asm-arm/atomic.h include/asm-arm26/atomic.h +18 more+269 -00 replies
5/9mutex subsystem, coreinclude/linux/mutex.h kernel/Makefile kernel/mutex.c+619 -15 replies
6/9mutex subsystem, switch ARM to use the xchg based implementationinclude/asm-arm/atomic.h+7 -50 replies
7/9mutex subsystem, debugging codeinclude/linux/mutex-debug.h include/linux/sched.h kernel/fork.c +2 more+549 -00 replies
8/9mutex subsystem, more debugging codearch/i386/mm/pageattr.c drivers/char/sysrq.c include/linux/mm.h +4 more+37 -00 replies
9/9mutex subsystem, XFS namespace collision fixesfs/xfs/linux-2.6/mutex.h fs/xfs/quota/xfs_dquot.c fs/xfs/quota/xfs_dquot.h +8 more+52 -522 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/9] mutex subsystem, -V4

this is the -V4 of the mutex subsystem patch-queue. It consists of the following patches:

add-atomic-xchg.patch
add-atomic-call-func-i386.patch
add-atomic-call-func-x86_64.patch
add-atomic-call-wrappers-rest.patch
mutex-core.patch
mutex-switch-arm-to-xchg.patch
mutex-debug.patch
mutex-debug-more.patch
xfs-mutex-namespace-collision-fix.patch

the patches are against Linus' latest GIT tree, and they should work fine on every Linux architecture.

Changes since -V3:

- imlemented an atomic_xchg() based mutex implementation. It integrated pretty nicely into the generic code, and most of the code is still shared.

- added __ARCH_WANT_XCHG_BASED_ATOMICS: if an architecture defines this then the generic mutex code will switch to the atomic_xchg() implementation.

This should be conceptually equivalent to the variant Nicolas Pitre posted - Nicolas, could you check out this one? It's much easier to provide this in the generic implementation, and the code ends up looking cleaner.

- eliminated ARCH_IMPLEMENTS_MUTEX_FASTPATH: there's no need for architectures to override the generic code anymore, with the introduction of __ARCH_WANT_XCHG_BASED_ATOMICS.

- ARM: enable __ARCH_WANT_XCHG_BASED_ATOMICS.

- ARM buildfix: move the new atomic primitives to the correct place. (Nicolas Pitre)

- optimization: unlock the mutex outside of the spinlock (suggested by Nicolas Pitre)

- removed leftover arch_semaphore reference from the XFS patch. (noticed by Arjan van de Ven)

- better document the fact that mutex_trylock() follows spin_trylock() semantics, not sem_trylock() semantics.

- cleanup: got rid of the MUTEX_LOCKLESS_FASTPATH define. (in -V3 this became equivalent to DEBUG_MUTEXES, via the elimination of the __HAVE_ARCH_CMPXCHG dependency on the fastpath.)

- further simplified and unified mutex_trylock().

- DocBook entries, and more documentation of internals.

- dropped the spinlock-debug fix, Linus merged it.

Ingo