public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/15310] _dl_sort_fini is O(n^3) causing slow exit when many dsos Date: Wed, 27 Oct 2021 14:58:58 +0000 [thread overview] Message-ID: <bug-15310-131-TSAqQEOkuc@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-15310-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=15310 Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |adhemerval.zanella at linaro dot o | |rg Resolution|--- |FIXED --- Comment #27 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> --- The testcase which creates a linear chain test to demostrate the O(n^3) behavior shows an improvement with the new DSO sorting algorithm from 15a0c5730d1d5ae: $ time ./testrun.sh /tmp/test/main1000 2>&1 >/dev/null real 0m1.641s user 0m1.565s sys 0m0.076s $ time GLIBC_TUNABLES=glibc.rtld.dynamic_sort=2 ./testrun.sh /tmp/test/main1000 2>&1 >/dev/null real 0m0.316s user 0m0.219s sys 0m0.095s And profile shows similar improvement: $ perf record ./testrun.sh /tmp/test/main1000 [...] $ perf report --stdio -q [...] 78.28% ld-linux-x86-64 ld.so [.] _dl_sort_maps 6.77% ld-linux-x86-64 ld.so [.] do_lookup_x 5.03% ld-linux-x86-64 ld.so [.] memmove 2.64% ld-linux-x86-64 ld.so [.] strcmp $ perf record env GLIBC_TUNABLES=glibc.rtld.dynamic_sort=2 ./testrun.sh /tmp/test/main1000 [...] $ perf report --stdio -q --dso=ld.so [...] 41.44% ld-linux-x86-64 [.] do_lookup_x 13.76% ld-linux-x86-64 [.] strcmp 6.01% ld-linux-x86-64 [.] _dl_map_object 5.17% ld-linux-x86-64 [.] _dl_name_match_p 1.34% ld-linux-x86-64 [.] _dl_map_object_from_fd 0.69% ld-linux-x86-64 [.] _dl_add_to_namespace_list -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-10-27 14:58 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-27 7:47 [Bug dynamic-link/15310] New: " dhatch at ilm dot com 2013-03-27 8:12 ` [Bug dynamic-link/15310] " dhatch at ilm dot com 2013-03-27 8:45 ` dhatch at ilm dot com 2013-03-27 12:57 ` carlos at redhat dot com 2013-03-27 14:19 ` ppluzhnikov at google dot com 2013-03-27 20:33 ` dhatch at ilm dot com 2013-03-27 20:50 ` [Bug dynamic-link/15310] New: " Ondřej Bílka 2013-03-27 20:50 ` [Bug dynamic-link/15310] " neleai at seznam dot cz 2013-03-27 21:00 ` carlos at redhat dot com 2013-03-27 21:07 ` carlos at redhat dot com 2013-03-27 21:13 ` law at redhat dot com 2013-03-27 23:44 ` dhatch at ilm dot com 2013-03-28 0:31 ` dhatch at ilm dot com 2013-03-28 7:42 ` Ondřej Bílka 2013-03-28 7:42 ` neleai at seznam dot cz 2013-03-28 10:00 ` dhatch at ilm dot com 2013-03-28 10:19 ` dhatch at ilm dot com 2013-03-28 17:09 ` law at redhat dot com 2013-03-28 17:31 ` dhatch at ilm dot com 2013-04-02 9:54 ` dhatch at ilm dot com 2013-04-02 11:31 ` Ondřej Bílka 2013-04-02 11:31 ` neleai at seznam dot cz 2013-04-02 13:07 ` dhatch at ilm dot com 2013-04-02 23:37 ` dhatch at ilm dot com 2013-04-03 7:57 ` Ondřej Bílka 2013-04-03 7:57 ` neleai at seznam dot cz 2013-04-06 21:07 ` carlos at redhat dot com 2014-06-13 13:51 ` fweimer at redhat dot com 2014-06-13 18:37 ` fweimer at redhat dot com 2021-10-27 14:58 ` adhemerval.zanella at linaro dot org [this message] 2021-10-27 14:59 ` adhemerval.zanella at linaro dot org
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=bug-15310-131-TSAqQEOkuc@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@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: linkBe 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).