Re: [PATCH] Lightweight userspace semaphores...

Linus Torvalds (torvalds@transmeta.com)
Mon, 25 Feb 2002 09:44:09 -0800 (PST)


On Mon, 25 Feb 2002, Alan Cox wrote:
>
> Any kernel special cases it adds will be unswappable because they are in
> kernel space (not the semaphores here - we want them to be swappable and
> they can be)

Alan, wake up!

I'm talking about anonymous semaphores, the kernel implementation can just
map a normal anonymous page there.

On 99.9% of all machines out there, you can have semaphores in perfectly
normal memory.

> When you create a shared mapping by passing -1 to mmap we do

Why are you talking about shared mappings?

The most common case for any fast semaphores are for _threaded_
applications. No shared memory, no nothing.

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/