mutex subsystem, ANNOUNCE
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 1 replyIn review
Changes since the previous version from the cover letter
- fixed the %eax clobber bug noticed by Linus. Also fixed a similar bug in the x86_64 assembly routine. Ended up solving this by marking the register clobbered - the function-always-returns change resulted in worse code. (usually the slowpath functions dont have the atomic-lock parameter ready at the end of the function, so they have to do extra work to return it.)
- implemented Oleg's suggestion of doing the xchg() before adding the waiter to the queue.
- optimization: in the xchg() case we can avoid hitting the slowpath when releasing the lock later on, by setting the count to 0 if the wait-list is otherwise empty. This is the common-case for wakeups.
- bugfix: forgot to take a spinlock in the signal-return path.
- added a couple of likely/unlikely modifiers, based on profile output.
- inline the trylock fastpath into the mutex_trylock() function.
- move the waiter->lock field into the debug path - nothing in the non-debug case was using it. This is also a small optimization for the slowpath.
- optimization: do a cheaper list_del in the non-debug case. This also enabled the removal of debug_remove_waiter().
- fix for the debugging branch: initialize the wait->list to empty.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | mutex subsystem, XFS namespace collision fixesfs/ fs/ fs/ +8 more | +52 | 1 reply | |
| 2/8 | mutex subsystem, add atomic_cmpxchg() to all archesinclude/ include/ include/ +19 more | +29 | 0 replies | |
| 3/8 | mutex subsystem, add atomic_*_call_if_*() to i386include/ | +57 | 0 replies | |
| 4/8 | mutex subsystem, add atomic_*_call_if_*() to x86_64include/ | +58 | 0 replies | |
| 5/8 | mutex subsystem, add atomic_*_call_if_*() defaults to the remaining archesinclude/ include/ include/ +18 more | +269 | 0 replies | |
| 6/8 | mutex subsystem, coreinclude/ kernel/ kernel/ | +554 | 0 replies | |
| 7/8 | mutex subsystem, debugging codeinclude/ include/ kernel/ +2 more | +549 | 0 replies | |
| 8/8 | mutex subsystem, more debugging codearch/ drivers/ include/ +5 more | +47 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/8] mutex subsystem, ANNOUNCE
this is the latest version of the mutex subsystem patch-queue. It consists of the following patches:
xfs-mutex-namespace-collision-fix.patch
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-debug.patch
mutex-debug-more.patch
the patches are against Linus' latest tree.
Changes since the previous version:
- fixed the %eax clobber bug noticed by Linus. Also fixed a similar bug in the x86_64 assembly routine. Ended up solving this by marking the register clobbered - the function-always-returns change resulted in worse code. (usually the slowpath functions dont have the atomic-lock parameter ready at the end of the function, so they have to do extra work to return it.)
- implemented Oleg's suggestion of doing the xchg() before adding the waiter to the queue.
- optimization: in the xchg() case we can avoid hitting the slowpath when releasing the lock later on, by setting the count to 0 if the wait-list is otherwise empty. This is the common-case for wakeups.
- bugfix: forgot to take a spinlock in the signal-return path.
- added a couple of likely/unlikely modifiers, based on profile output.
- inline the trylock fastpath into the mutex_trylock() function.
- move the waiter->lock field into the debug path - nothing in the non-debug case was using it. This is also a small optimization for the slowpath.
- optimization: do a cheaper list_del in the non-debug case. This also enabled the removal of debug_remove_waiter().
- fix for the debugging branch: initialize the wait->list to empty.
Ingo