From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/2] malloc: Use __libc_type to detect an inner libc
Date: Mon, 16 Nov 2020 10:18:38 -0300 [thread overview]
Message-ID: <987577fd-5b6b-d778-1b22-458b0bc8df0f@linaro.org> (raw)
In-Reply-To: <87k0uprsb0.fsf@oldenburg2.str.redhat.com>
On 13/11/2020 16:05, Florian Weimer wrote:
> * 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.
In fact I meant what is the gain of using sbrk on outer libc. I am asking
because maybe an option would be to use the same strategy regardless whether
it is a inner or outer libc.
next prev parent reply other threads:[~2020-11-16 13:18 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
2020-11-16 13:18 ` Adhemerval Zanella [this message]
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=987577fd-5b6b-d778-1b22-458b0bc8df0f@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=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).