public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: rth7680@gmail.com, gcc-patches@gcc.gnu.org,
	ramana.radhakrishnan@arm.com, agraf@suse.de, matz@suse.de,
	Richard Henderson <richard.henderson@linaro.org>,
	libstdc++@gcc.gnu.org
Subject: Re: __libc_single_threaded variable for optimizing std::shared_ptr (was: [PATCH, AArch64 00/11] LSE atomics out-of-line)
Date: Mon, 04 Feb 2019 12:15:00 -0000	[thread overview]
Message-ID: <20190204121541.GT15627@redhat.com> (raw)
In-Reply-To: <871s4nu7po.fsf@oldenburg2.str.redhat.com>

On 04/02/19 12:13 +0100, Florian Weimer wrote:
>* Richard Henderson:
>
>> Therefore, I've created small out-of-line helpers that are directly
>> linked into every library or executable that requires them.  There
>> will be two direct branches, both of which will be well-predicted.
>
>This work inspired me to put together something that provides a similar
>hidden variable, comparable to __aa64_have_atomics, to libc_nonshared.a
>in glibc:
>
>  <https://sourceware.org/ml/libc-alpha/2019-02/msg00073.html>
>
>I hope it can be eventually be used to dynamically optimize the use of
>atomics in the std::shared_ptr implementation in libstdc++.

This makes me very happy. Thanks, Florian!

>For a generic optimization of all atomics, this is not suitable because
>even a single-threaded process can have MAP_SHARED mappings and will
>have to use atomics there.
>
>Thanks,
>Florian

      reply	other threads:[~2019-02-04 12:15 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  5:04 [PATCH, AArch64 00/11] LSE atomics out-of-line rth7680
2018-09-26  5:04 ` [PATCH, AArch64 01/11] aarch64: Simplify LSE cas generation rth7680
2018-09-26  5:04 ` [PATCH, AArch64 07/11] Link static libgcc after shared libgcc for -shared-libgcc rth7680
2018-09-26 16:55   ` Joseph Myers
2018-09-26 16:57     ` Richard Henderson
2018-09-26  5:04 ` [PATCH, AArch64 05/11] aarch64: Emit LSE st<op> instructions rth7680
2018-09-26  5:04 ` [PATCH, AArch64 10/11] aarch64: Implement TImode compare-and-swap rth7680
2018-09-27 13:08   ` Matthew Malcomson
     [not found]   ` <3460dd10-4d9a-1def-3f9b-5f7a1afe5906@arm.com>
2018-09-27 16:39     ` Richard Henderson
2018-09-27 17:07       ` Matthew Malcomson
2018-10-01 13:51   ` Matthew Malcomson
2018-09-26  5:04 ` [PATCH, AArch64 03/11] aarch64: Improve swp generation rth7680
2018-09-26  5:04 ` [PATCH, AArch64 08/11] aarch64: Add out-of-line functions for LSE atomics rth7680
2018-09-26  9:01   ` Florian Weimer
2018-09-26 14:33     ` Richard Henderson
2018-09-26 14:36       ` Florian Weimer
2018-09-26 14:37         ` Richard Henderson
2018-09-28 16:29   ` Ramana Radhakrishnan
2018-09-26  5:04 ` [PATCH, AArch64 04/11] aarch64: Improve atomic-op lse generation rth7680
2018-09-26  5:04 ` [PATCH, AArch64 06/11] Add visibility to libfunc constructors rth7680
2018-09-26  5:04 ` [PATCH, AArch64 11/11] Enable -matomic-ool by default rth7680
2018-09-26  5:04 ` [PATCH, AArch64 09/11] aarch64: Implement -matomic-ool rth7680
2018-09-26  7:40 ` [PATCH, AArch64 02/11] aarch64: Improve cas generation rth7680
2018-09-26  9:22 ` [PATCH, AArch64 00/11] LSE atomics out-of-line Florian Weimer
2018-09-26 13:05   ` Michael Matz
2018-09-27 13:08 ` Ramana Radhakrishnan
2018-09-27 15:19   ` Alexander Graf
2018-09-27 16:51   ` Richard Henderson
2018-09-28  8:48     ` Ramana Radhakrishnan
2019-02-04 11:14 ` __libc_single_threaded variable for optimizing std::shared_ptr (was: [PATCH, AArch64 00/11] LSE atomics out-of-line) Florian Weimer
2019-02-04 12:15   ` Jonathan Wakely [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=20190204121541.GT15627@redhat.com \
    --to=jwakely@redhat.com \
    --cc=agraf@suse.de \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=ramana.radhakrishnan@arm.com \
    --cc=richard.henderson@linaro.org \
    --cc=rth7680@gmail.com \
    /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).