From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH] nptl: Remove private futex optimization [BZ #27304]
Date: Wed, 3 Feb 2021 17:10:54 -0300 [thread overview]
Message-ID: <553a43a6-108c-9825-b9a1-879c28fc1002@linaro.org> (raw)
In-Reply-To: <87k0rstbtc.fsf@oldenburg.str.redhat.com>
On 01/02/2021 05:46, Florian Weimer via Libc-alpha wrote:
> It is effectively used, except for pthread_cond_destroy, where we do
> not want it; see bug 27304. The internal locks do not support a
> process-shared mode.
>
> This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
> Move pthread_cond_destroy implementation into libc").
>
> Tested on i686-linux-gnu and x86_64-linux-gnu. This is for glib 2.34,
> although I intend to backport it to 2.32 and 2.33 because it looks like
> it might be a regression.
The lll_futex_wake is used on THREAD_GSCOPE_RESET_FLAG, but it already
uses LLL_PRIVATE on all architectures.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> ---
> sysdeps/nptl/lowlevellock-futex.h | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
> index ecb729da6b..ca96397a4a 100644
> --- a/sysdeps/nptl/lowlevellock-futex.h
> +++ b/sysdeps/nptl/lowlevellock-futex.h
> @@ -50,20 +50,8 @@
> #define LLL_SHARED FUTEX_PRIVATE_FLAG
>
> #ifndef __ASSEMBLER__
> -
> -# if IS_IN (libc) || IS_IN (rtld)
> -/* In libc.so or ld.so all futexes are private. */
> -# define __lll_private_flag(fl, private) \
> - ({ \
> - /* Prevent warnings in callers of this macro. */ \
> - int __lll_private_flag_priv __attribute__ ((unused)); \
> - __lll_private_flag_priv = (private); \
> - ((fl) | FUTEX_PRIVATE_FLAG); \
> - })
> -# else
> -# define __lll_private_flag(fl, private) \
> +# define __lll_private_flag(fl, private) \
> (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
> -# endif
>
> # define lll_futex_syscall(nargs, futexp, op, ...) \
> ({ \
>
prev parent reply other threads:[~2021-02-03 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 8:46 Florian Weimer
2021-02-01 9:24 ` Andreas Schwab
2021-02-01 9:25 ` Florian Weimer
2021-02-03 20:10 ` Adhemerval Zanella [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=553a43a6-108c-9825-b9a1-879c28fc1002@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).