From: Ulrich Drepper <drepper@redhat.com>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: second, bigger problem with private futexes
Date: Mon, 21 May 2007 12:43:15 -0700 [thread overview]
Message-ID: <4651F653.9060802@redhat.com> (raw)
In-Reply-To: <4651F261.2040903@cosmosbay.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Dumazet wrote:
> 3) if condvar is PRIVATE and mutex is SHARED, a FUTEX_WAKE_PRIVATE
> should be done. (and loose the REQUEUE optim)
> Yes we could add a special futex primitive for this special case. But I
> cannot see how a program could use such a construct.
Very easily: mutexes are often created independently from the condvars
and they are used for many things. Maybe a program is even creating all
mutexes as shared to be ready for all situations. Normally doing this
is no big problem, the performance penalties are minimal.
> 4) if condvar is SHARED and mutex is private, we have a *problem*,
> because the process doing the broadcast() can be in another mm. So a
> requeue is not possible at all.
It is if we can specify the owner of the mutex. I.e., the PID.
But yes, this case is extremely ugly.
The problem is that all these cases worked nice so far. They all had
the same good performance. Now we are severely penalizing code which
mismatches condvar and mutex shared attributes. There is a good reason
why we introduced FUTEX_CMP_REQUEUE, the benefits in certain programs is
huge.
- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGUfZT2ijCOnn/RHQRAkT0AJ4pgX7RtdUf8uwyP9v7o+nkv/9uMACfbx6+
kBaJLSSvDBjN09KMgmLKnSI=
=4XMz
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2007-05-21 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 17:26 second, bigger problem with private futexes Ulrich Drepper
2007-05-21 18:15 ` Eric Dumazet
2007-05-21 18:26 ` Ulrich Drepper
2007-05-21 18:48 ` Eric Dumazet
2007-05-21 19:26 ` Eric Dumazet
2007-05-21 19:43 ` Ulrich Drepper [this message]
2007-05-21 19:55 ` Eric Dumazet
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=4651F653.9060802@redhat.com \
--to=drepper@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.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