Re: [PATCH] Fast Userspace Mutexes III.

From: Richard Henderson (rth@twiddle.net)
Date: Thu Mar 07 2002 - 03:48:21 EST


On Thu, Mar 07, 2002 at 02:39:47PM +1100, Rusty Russell wrote:
> But since the real problem here is "lock held forever", so I don't care.

No, "lock held forever" merely makes the example trivial.
"Lock held for a while" is the real problem.

> > You really do need that cmpxchg loop.
>
> Well, not decrementing if count < 0 already also works

How, exactly, are you planning on doing that atomically?
Clue: 386 SMP requires an extra spinlock.

> PS. Will Alpha have to do any special magic with the mmap PROT_SEM flag?

No.

r~
-
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/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:01:00 EST