lkml.org 
[lkml]   [2005]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/19] MUTEX: Introduce simple mutex implementation
On Wed, Dec 14, 2005 at 03:35:36AM -0800, Andrew Morton wrote:
>
> Could someone please remind me why we're even discussing this, given that
> mutex_down() is slightly more costly than current down(), and mutex_up() is
> appreciably more costly than current up()?

That's a good question. The new mutex implementation here is big regression
to what we have right now. What I had in mind when brainstorming something
like this would be to have a slow-path pure C semaphore implementation that
is cross-platform, and keep the current semaphore code as mutex. Once that
is done the mutex code could be optimized further because it doesn't need to
deal with the broader uses of the semaphore, and we could add lots of useful
debugging.

The current patchkit is far from that.

What might be more useful as a start is to implement a mutex type ontop
of the current semaphore that has lots of additional checks for the DEBUG
build so we have nice diagnostics. Once we have all users of mutex semantics
using that API we can change the underlying implementation to whatever we want.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-14 13:20    [W:0.169 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site