From: Eric Dumazet <dada1@cosmosbay.com>
To: Ulrich Drepper <drepper@redhat.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 20:15:48 +0200 [thread overview]
Message-ID: <4651E1D4.6010705@cosmosbay.com> (raw)
In-Reply-To: <4651D628.1070206@redhat.com>
Ulrich Drepper a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This one is a big problem:
>
> If I understand the code correctly, a FUTEX_CMP_REQUEUE from a private
> futex will add the waiters to the other futex as a private futex. And
> similarly for shared.
>
> I.e., it is not possible to have one futex private and the other shared.
> This is a huge problem. The shared/private status of a conditional
> variable and the mutex used with it don't have to match. But this is
> where FUTEX_CMP_REQUEUE is used.
>
> If this is not changed (assuming I'm right with my analysis of the
> kernel code) this means mutexes and condvars will not be able to use
> private futexes.
Do you mean POSIX allowed to mix PROCESS_PRIVATE and PROCESS_SHARED condvar
and mutexes ? Seems silly to me :(
>
> What would be needed is an additional parameter for FUTEX_CMP_REQUEUE
> and FUTEX_CMP_REQUEUE_PI which specifies the state (shared/private) of
> the target futex. The original futex' state is encoded in the command
> (the FUTEX_PRIVATE_FLAG ORed to FUTEX_CMP_REQUEUE*).
>
Well, I guess it should be easy to add this if really necessary.
next prev parent reply other threads:[~2007-05-21 18:16 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 [this message]
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
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=4651E1D4.6010705@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.