On Thu, 22 Dec 2005, Andrew Morton wrote:
> Christoph Hellwig <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]