From: Chung-Lin Tang <chunglin_tang@mentor.com>
To: Carlos O'Donell <carlos@redhat.com>,
Xiaoming Ni <nixiaoming@huawei.com>, <libc-alpha@sourceware.org>,
<brooks@gcc.gnu.org>, <ppluzhnikov@google.com>,
<neleai@seznam.cz>, <marat@slonopotamus.org>
Cc: <wangle6@huawei.com>
Subject: Re: [PATCH] elf: Sort only uninitialized objects in _dl_map_object_deps()
Date: Sun, 26 Jul 2020 18:41:02 +0800 [thread overview]
Message-ID: <accfd786-0d1e-bb27-d950-76ab30633767@mentor.com> (raw)
In-Reply-To: <8a15102b-c461-23e2-21d4-f2f7b2b78682@redhat.com>
On 2020/7/26 4:57 AM, Carlos O'Donell via Libc-alpha wrote:
>> Run the dlopen() for each dynamic library.
>> Before the patch is installed, it takes 214 seconds.
>> After patching, it takes 37 seconds.
> Is it still correct?
>
> Do you have a test case you can add?
>
>> Signed-off-by: Xiaoming Ni<nixiaoming@huawei.com>
> Reviewing this will have to wait until after the release, but this patch is
> interesting.
This patch appears to add a linear pass to somewhat reduce the input size
of a circularly linked case, but frankly speaking, is only useful with the current
old sorting algorithm, and just to a certain degree.
The mentioned test case still takes 37 seconds with the proposed patch, while for
the new DFS-based algorithm, even without any such special case input reduction,
the sort time will probably be instantaneous.
> Have you looked at Chung-Ling Tang's most recent work in this area?
>
> https://patchwork.sourceware.org/project/glibc/patch/1427b370-7400-afd0-16e8-55c1072db20e@mentor.com/
> https://patchwork.sourceware.org/project/glibc/patch/5de3ab61-3dca-b400-15c6-92ff5ae80877@mentor.com/
If you're trying out the #17645 sorting patch, remember to add GLIBC_TUNABLES=glibc.rtld.dynamic_sort=2
to the environment before running the test, or it will still be the old algorithm.
> Could you use Chung-Ling's test case constructor to write a test case?
>
Yeah, a new test case like this is always nice, especially to test if the description language
is expressive enough to handle this.
Chung-Lin
next prev parent reply other threads:[~2020-07-26 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 10:52 Xiaoming Ni
2020-07-25 20:57 ` Carlos O'Donell
2020-07-26 10:41 ` Chung-Lin Tang [this message]
2020-07-27 0:36 ` Carlos O'Donell
2020-07-29 13:56 ` Xiaoming Ni
2020-08-03 18:37 ` Carlos O'Donell
2022-09-13 9:42 ` Carlos O'Donell
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=accfd786-0d1e-bb27-d950-76ab30633767@mentor.com \
--to=chunglin_tang@mentor.com \
--cc=brooks@gcc.gnu.org \
--cc=carlos@redhat.com \
--cc=cltang@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=marat@slonopotamus.org \
--cc=neleai@seznam.cz \
--cc=nixiaoming@huawei.com \
--cc=ppluzhnikov@google.com \
--cc=wangle6@huawei.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).