lkml.org 
[lkml]   [2005]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 0/9] mutex subsystem, -V4


On Thu, 22 Dec 2005, Thomas Gleixner wrote:
>
> Semaphores need a counter, mutexes only a binary representation of the
> locked/unlocked state

Actually, that's not true.

A _spinlock_ only needs a binary representation of the locked/unlocked
state.

A mutex needs a _ternary_ representation. It needs an additional
"contention" state to tell the wakeup that extra action is needed.

If you don't handle contention (and do extra action all the time), you're
screwed from a performance standpoint.

Linus
-
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: 2009-11-18 23:46    [W:0.273 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site