This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 0/6][BZ #11588] pi-condvars: add priority inheritance for pthread_cond_* internal lock
- From: Torvald Riegel <triegel at redhat dot com>
- To: gratian dot crisan at ni dot com
- Cc: libc-alpha at sourceware dot org, Darren Hart <dvhart at linux dot intel dot com>, "Carlos O'Donell" <carlos at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Jeff Law <law at redhat dot com>, Scot Salmon <scot dot salmon at ni dot com>, Siddhesh Poyarekar <spoyarek at redhat dot com>, Thomas Gleixner <tglx at linutronix dot de>, Clark Williams <williams at redhat dot com>, "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>, Will Newton <will dot newton at linaro dot org>, gratian at gmail dot com
- Date: Mon, 18 Aug 2014 23:14:19 +0200
- Subject: Re: [PATCH 0/6][BZ #11588] pi-condvars: add priority inheritance for pthread_cond_* internal lock
- Authentication-results: sourceware.org; auth=none
- References: <OF6ABEE614 dot FAE80AD2-ON86257D0E dot 006B38F4-86257D0E dot 0070034A at ni dot com> <1406680317-20189-1-git-send-email-gratian dot crisan at ni dot com>
On Tue, 2014-07-29 at 19:31 -0500, firstname.lastname@example.org wrote:
> Torvald Riegel made us aware of the new POSIX changes related to condvars
> (http://austingroupbugs.net/view.php?id=609) and C++11 clarification
> We believe we can work on these issues in parallel and if they end up
> colliding we will fix it.
I've asked the Austin Group about the current status of #609. It seems
they want the stronger ordering guarantees:
I have an implementation that fulfills these guarantees, but I don't
think it's possible to fully implement PI with the stronger guarantees
and the futex operations that we currently have. The possible options
that I see are:
* Accept potential ABA issues (e.g., a lost wake-up if you do exactly
2^32 signals after a wait).
* Accept that there's no PI every 2^32 wait calls (maybe that number can
be increased somewhat, but this depends on the interleaving of
wait/signal calls I believe).
* Don't support PI on process-shared condvars, so that we can boost the
priority of waiters with per-waiter PI mutexes. More overhead.
What would be everyone's preference?
Note that if we had 64b futexes, the first two options would both have
2^64 instead of 2^32, so both would be okay in practice.