From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/2] malloc: Use __libc_type to detect an inner libc
Date: Fri, 13 Nov 2020 20:05:23 +0100 [thread overview]
Message-ID: <87k0uprsb0.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <fcbcf37f-e4b2-f9e6-ef4f-aa4c2b97e50b@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Fri, 13 Nov 2020 15:21:20 -0300")
* Adhemerval Zanella via Libc-alpha:
> On 13/11/2020 13:14, Florian Weimer via Libc-alpha wrote:
>> The inner libc must not use sbrk. _dl_addr occasionally shows up
>> in profiles, but had to be used before because __libc_multiple_libs
>> was unreliable.
>
> LGTM. Is the performance the only advantage of using sbrk on
> the inner libc?
Avoiding sbrk in the inner libc is required for correctness because sbrk
is not thread-safe, and there is no external synchronization.
The startup performance improvement comes from not calling _dl_addr. On
POWER, it saves around 150,000 instructions, according to a quick test.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
next prev parent reply other threads:[~2020-11-13 19:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 16:14 [PATCH 1/2] Replace __libc_multiple_libcs with tri-state __libc_type Florian Weimer
2020-11-13 16:14 ` [PATCH 2/2] malloc: Use __libc_type to detect an inner libc Florian Weimer
2020-11-13 18:21 ` Adhemerval Zanella
2020-11-13 19:05 ` Florian Weimer [this message]
2020-11-16 13:18 ` Adhemerval Zanella
2020-11-24 11:23 ` Florian Weimer
2020-11-13 18:19 ` [PATCH 1/2] Replace __libc_multiple_libcs with tri-state __libc_type Adhemerval Zanella
2020-11-13 22:02 ` Florian Weimer
2020-11-16 18:38 ` Adhemerval Zanella
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=87k0uprsb0.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--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).