[concurrency-interest] park and unpark low-level details

Martin Buchholz martinrb at google.com
Sun Nov 22 12:36:25 EST 2009


On Fri, Nov 20, 2009 at 10:41, Andrew Haley <aph at redhat.com> wrote:

> Dave Dice wrote:
>
> >> What do you man by this?  I guess there's a nice way to map park and
> >> unpark onto low-level NPTL primitives (futexes, perhaps?)  Did you
> >> have a sketch of a design for that?
> >
>
> > We preferred to use more standardized interfaces.  I experimented
> > with using futexes instead of the usual condvar-mutex-flag tuple but
> > it wasn't particularly better.
>
> I'm not surprised.  I did some profiling, and even with quite heavily
> contended locks the time spent in park and unpark is often down in
> the noise.  Amazing, really.  :-)
>

Coincidentally, there's an article on futexes here:

http://lwn.net/Articles/360699/

Regarding using standard interfaces:

---
Man pages: The current man pages do not include some of the new futex
operations. They suggest a policy for the value of the futex which has led
to some confusion regarding usage of futexes. Worst of all, the user space
futex() definition has been removed from /usr/include/linux/futex.h,
rendering the man pages not only incomplete, but also inaccurate. Users of
futexes must use the syscall interface directly.
---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20091122/361fa38c/attachment.html>


More information about the Concurrency-interest mailing list