Subject: Re: map user memory in kernel
To: Gordon Waidhofer <>
From: Eric Haszlakiewicz <>
List: tech-kern
Date: 11/06/2005 21:23:43
On Sun, Nov 06, 2005 at 02:58:05PM -0800, Gordon Waidhofer wrote:
> If they are as light at tsleep()/wakeup(), then,
> as somebody already pointed out:
> 	int futex_event;
> 	futex_sleep () { sleep (&futex_event); }
> 	futex_wakeup () { wakeup (&futex_event); }
> will work. Everything else is an improvement.
> Is this a case of trying to hard? It really depends
> on the guarantees made by futex() and whether the
> kernel need to manipulate any variables visible in
> userland. Is that the case? What is the case?

	I don't think that's going to cut it.  I read that even
waking up too many processes on a single futex can cause things
to go 20x slower.  Creating a thundering herd of all users of
futex on a system would probably make it unusable.