Re: [PATCH] [2/2] posix message queues

From: Ulrich Drepper
Date: Sun Oct 05 2003 - 11:02:04 EST


Peter Wächtler wrote:

> Userspace translates SIGEV_THREAD to something that uses SIGEV_SIGNAL.
> Ulrich made a suggestion to use a futex, but I think of something even
> more lightweight. Just put the requestor right to sleep.

This has the disadvantage that it codifies the requirement of creating
the thread for the userlevel signaling ahead of time. While this is a
valid implementation it is not the best (resource-wise) and doesn't
allow for optimizations. Using a futex will allow to implement a scheme
where one single thread does the waiting for possibly many requests.
Imagine the benefits in case there are dozens of outstanding requests.
The additional system exit+entry isn't that expensive to justify
removing the flexibility.

--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/