public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/6955] New: PRIO_INHERIT mutexes do not use FUTEX_PRIVATE_FLAG
@ 2008-10-09 19:20 ben at ben dot com
2008-10-09 19:21 ` [Bug nptl/6955] " ben at ben dot com
2008-11-01 19:57 ` drepper at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: ben at ben dot com @ 2008-10-09 19:20 UTC (permalink / raw)
To: glibc-bugs
Code in the PRIO_INHERIT cases of pthread_mutex_lock/unlock/trylock/timedlock
call futex() directly with FUTEX_(UN)LOCK_PI regardless of the pshared-ness of
the mutex. Other cases call futex() indirectly through __lll_*() interfaces
that set FUTEX_PRIVATE_FLAG as appropriate. This was observed to cause
contention on mm->mmap_sema leading to large, random latencies on otherwise
quick lock operations (apparently due to brk() holding mmap_sema).
I patched nptl to set the private flag in the PRIO_INHERIT cases (based on the
pshared-ness of the mutex) and tested that against the regression tests and my
application. The tests pass, the application works, and the performance problem
is solved. However, I am working from a fairly superficial understanding of
this code, and I have not received replies from my inquiries to experts in this
code.
I will try to attach my patch after I submit. I think it illustrates the
desired behavior, but it may not be exactly what glibc maintainers would want.
--
Summary: PRIO_INHERIT mutexes do not use FUTEX_PRIVATE_FLAG
Product: glibc
Version: 2.8
Status: NEW
Severity: normal
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: ben at ben dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-redhat-linux-gnu
GCC host triplet: x86_64-redhat-linux-gnu
GCC target triplet: x86_64-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=6955
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-02 6:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-6955-131@http.sourceware.org/bugzilla/>
2014-07-02 6:54 ` [Bug nptl/6955] PRIO_INHERIT mutexes do not use FUTEX_PRIVATE_FLAG fweimer at redhat dot com
2008-10-09 19:20 [Bug nptl/6955] New: " ben at ben dot com
2008-10-09 19:21 ` [Bug nptl/6955] " ben at ben dot com
2008-11-01 19:57 ` drepper at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).