From: Darren Hart <dvhltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Petr Baudis <pasky-AlSwsSmVLrQ@public.gmane.org>,
drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>,
Eric Dumazet
<eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Dinakar Guniguntala
<dino-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>,
John Stultz <johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
John Kacur <jkacur-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: Futex manpages out of date
Date: Mon, 18 Jan 2010 09:23:50 -0800 [thread overview]
Message-ID: <4B549926.9020207@us.ibm.com> (raw)
In-Reply-To: <1263834214.4283.623.camel@laptop>
Peter Zijlstra wrote:
> On Mon, 2010-01-18 at 17:40 +0100, Petr Baudis wrote:
>> On Fri, Jan 15, 2010 at 06:11:24PM +0100, Peter Zijlstra wrote:
>>> On Fri, 2010-01-15 at 08:58 -0800, Darren Hart wrote:
>>>> The futex man-pages (2,7) from version 3.15-1 and at least a few earlier
>>>> versions are considerably out of date with respect to the current
>>>> implementation. They don't document newer op codes, such as:
>>>>
>>>> FUTEX_WAIT_BITSET
>>>> FUTEX_WAKE_BITSET
>>>> FUTEX_WAKE_OP
>>>> FUTEX_LOCK_PI
>>>> FUTEX_UNLOCK_PI
>>>> FUTEX_WAIT_REQUEUE_PI
>>>> FUTEX_CMP_REQUEUE_PI
>>>>
>>>> These new wait op codes now use absolute timeouts, while the original
>>>> FUTEX_WAIT uses a relative timeout. Lastly, and most importantly, glibc
>>>> has removed the futex() wrapper to syscall(SYS_futex, ...). With that in
>>>> mind, would people prefer that we simply remove the futex man-pages
>>>> (2,7)?
>>> A readable text about the interaction between the futex value and the
>>> various futex ops and how to build proper locking primitives with them
>>> would be helpful I think, however doing that in the form of a locking
>>> library (as has been suggested at KS) seems plenty fine to me.
>>>
>>> Readable code is much better than rambling English at conveying this
>>> stuff.
>> http://people.redhat.com/drepper/futex.pdf is pretty good description,
>> unfortunately also outdated by now. Perhaps it would be interesting to
>> convert this into some kind of wiki form with Ulrich's permission?
>
> People keep saying that, but I found it highly unreadable.
Interesting. I found it to be a good introduction into the usage of
futexes as well as cautionary of the many non-obvious race conditions
possible with locking structures built on futexes.
--
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-01-18 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 16:58 Futex manpages out of date Darren Hart
[not found] ` <4B509EA1.8060509-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-15 17:11 ` Peter Zijlstra
2010-01-15 17:13 ` Darren Hart
[not found] ` <4B50A228.8070401-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-15 17:14 ` Peter Zijlstra
2010-01-18 16:40 ` Petr Baudis
[not found] ` <20100118164000.GK2249-DDGJ70k9y3lX+M3pkMnKjw@public.gmane.org>
2010-01-18 16:51 ` Darren Hart
2010-01-18 17:03 ` Peter Zijlstra
2010-01-18 17:23 ` Darren Hart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B549926.9020207@us.ibm.com \
--to=dvhltc-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=dino-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org \
--cc=drepper-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jkacur-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-X9Un+BFzKDI@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pasky-AlSwsSmVLrQ@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox