Re: [PATCH] Lightweight userspace semaphores...

From: Ingo Molnar (mingo@elte.hu)
Date: Sat Feb 23 2002 - 15:31:31 EST


On Sat, 23 Feb 2002, Larry McVoy wrote:

> Exactly. SMP gives you coherent memory and test-and-set or some other
> atomic operation. Why not use it?

the userspace library side does it. The kernel patch is the slowpath, the
fast path (no contention) happens in user-space, using SMP-atomic
instructions. It's all very nice and lightweight.

also as far as i can see, this implementation enables semaphores to live
anywhere within the VM, the /dev/usem is just a hack to communicate this
VM address to the kernel-space code. So i think the patch's concepts are
really nice, except the interface cleanliness issue which shouldnt be too
hard to fix - adding new syscalls is pleasant work anyway :-)

        Ingo

-
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 : Sat Feb 23 2002 - 21:00:51 EST