public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/8] mutex subsystem, -V6
@ 2005-12-22 23:04 Ingo Molnar
  2005-12-22 23:55 ` Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ingo Molnar @ 2005-12-22 23:04 UTC (permalink / raw)
  To: lkml
  Cc: Linus Torvalds, Andrew Morton, Arjan van de Ven, Nicolas Pitre,
	Jes Sorensen, Zwane Mwaikambo, Oleg Nesterov, David Howells,
	Alan Cox, Benjamin LaHaise, Steven Rostedt, Christoph Hellwig,
	Andi Kleen, Russell King

this is verion -V6 of the generic mutex subsystem. It consists of the 
following patches:

  add-atomic-xchg.patch
  mutex-generic-asm-implementations.patch
  mutex-arch-mutex-h.patch
  mutex-core.patch
  mutex-docs.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.

the delta since -V5:

  53 files changed, 718 insertions(+), 454 deletions(-)

this release picks up Arjan's asm/mutex.h implementation, which adds 
asm-generic/mutex-dec.h, asm-generic/mutex-xchg.h for architectures to 
pick up. i386 and x86_64 use their own optimized version already, the 
other architectures default to mutex-xchg.h. Architectures specify the 
following functions:

 -------------------------------------------------------------------
 *  __mutex_fastpath_lock - try to take the lock by moving the count
 *                          from 1 to a 0 value
 *  @count: pointer of type atomic_t
 *  @fn: function to call if the original value was not 1
 -------------------------------------------------------------------
 *  __mutex_fastpath_lock_retval - try to take the lock by moving the count
 *                                 from 1 to a 0 value
 *  @count: pointer of type atomic_t
 *  @fn: function to call if the original value was not 1
 -------------------------------------------------------------------
 *  __mutex_fastpath_unlock - try to promote the mutex from 0 to 1
 *  @count: pointer of type atomic_t
 *  @fn: function to call if the original value was not 1
 -------------------------------------------------------------------

and __mutex_slowpath_needs_to_unlock(), to specify whether the fastpath 
has touched the count or not.

i have tested this on x86, and i have booted all 4 variants: 
mutex-xchg.h, mutex-dec.h, asm-i386/mutex.h and the debug version. (in 
MUTEX_DEBUG_FULL mode, i.e. with the mutexes in real use.)

Nico, Christoph, does this approach work for you? Nico, you might want 
to try an ARM-specific mutex.h implementation.

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-12-23  8:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-22 23:04 [patch 0/8] mutex subsystem, -V6 Ingo Molnar
2005-12-22 23:55 ` Nicolas Pitre
2005-12-23  5:04   ` Nicolas Pitre
2005-12-23  8:09     ` Ingo Molnar
2005-12-23  4:59 ` Nicolas Pitre
2005-12-23  8:04   ` Ingo Molnar
2005-12-23  5:12 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox