lkml.org 
[lkml]   [2005]   [Dec]   [23]   [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, Andrew Morton wrote:

> Christoph Hellwig <hch@infradead.org> wrote:
> > I really don't get why you hate mutex primitives so much.
>
> I've just spelled out in considerable detail why this work is premature.
> How can you not "get" it? Why do I have to keep saying the same thing in
> different ways? It's really quite simple.
>
>
> So here is permutation #4:
>
> If we can optimise semaphores for speed and space, the mutexes are
> *unneeded*.

How can't you get the fact that semaphores could _never_ be as simple as
mutexes? This is a theoritical impossibility, which maybe turns out not
to be so true on x86, but which is damn true on ARM where the fast path
(the common case of a mutex) is significantly more efficient.

Semaphores _require_ an atomic decrement, mutexes do not. On some
architectures that makes a huge difference.

> And I think we _should_ optimise semaphores for speed and space. Don't you?

No one disagrees with that.

> If we can do that, there is no point at all in adding a new lock type which
> has no speed advantage and no space advantage and which has less
> functionality than semaphores.

The very point is that mutexes will always have a speed advantage by
nature.

> And, repeating myself yet again: if we can demonstrate that it is not
> feasible to optimise semaphores to the same performance and space efficiency
> of mutexes then (and only then) we have a reason for adding mutexes.

I spent the whole week making that demonstration repeatedly. Why are
you ignoring me?


Nicolas
-
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-23 15:27    [W:0.129 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site