public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paulo.cesar.pereira.de.andrade at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/17645] New: RFE: Improve performance of dynamic loader for deeply nested DSO dependencies. Date: Tue, 25 Nov 2014 13:37:00 -0000 [thread overview] Message-ID: <bug-17645-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=17645 Bug ID: 17645 Summary: RFE: Improve performance of dynamic loader for deeply nested DSO dependencies. Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: paulo.cesar.pereira.de.andrade at gmail dot com Created attachment 7970 --> https://sourceware.org/bugzilla/attachment.cgi?id=7970&action=edit Sample "redistributable" test case provided by a customer After glibc-2.11, there are 3 slightly different instances of a very CPU intensive loop in elf/dl-deps.c, elf/dl-fini.c and elf/dl-open.c. The loop does not scale well when there are cyclic dependencies, and may take more than 8 seconds to sort less than 300 shared objects when there a some cycles. Most of the time is spent in memmove. Sample perf output of it taking 8+ secs on a core i5: 31,24% timedlopen ld-2.17.so [.] _dl_map_object_deps 18,36% timedlopen ld-2.17.so [.] _wordcopy_fwd_aligned 16,50% timedlopen ld-2.17.so [.] _dl_sort_fini 15,47% timedlopen ld-2.17.so [.] dl_open_worker 13,08% timedlopen ld-2.17.so [.] _wordcopy_fwd_dest_aligned 4,95% timedlopen ld-2.17.so [.] memmove 0,07% timedlopen ld-2.17.so [.] do_lookup_x I have been using a patch for some weeks in rhel-6.3 (for basic tests where the problem was detected/reported), and my day to day computers, running rhel-7 and fedora rawhide, and cannot see any problems running kde, gnome, libreoffice and several other large applications or environments that load/unload or have large dso dependency chains. The proposed patch runs the test case in 10 ms, and a sample perf output is: 17,45% timedlopen ld-2.17.so [.] do_lookup_x 9,54% timedlopen ld-2.17.so [.] strcmp 6,91% timedlopen ld-2.17.so [.] _dl_map_object_deps 6,12% timedlopen ld-2.17.so [.] _dl_name_match_p 4,35% timedlopen ld-2.17.so [.] _dl_sort_fini 4,33% timedlopen ld-2.17.so [.] dl_open_worker -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2014-11-25 13:37 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-25 13:37 paulo.cesar.pereira.de.andrade at gmail dot com [this message] 2014-11-25 13:52 ` [Bug dynamic-link/17645] " paulo.cesar.pereira.de.andrade at gmail dot com 2014-11-25 14:10 ` paulo.cesar.pereira.de.andrade at gmail dot com 2014-11-25 14:37 ` paulo.cesar.pereira.de.andrade at gmail dot com 2014-11-26 16:41 ` carlos at redhat dot com 2014-11-26 21:56 ` paulo.cesar.pereira.de.andrade at gmail dot com 2014-11-28 15:51 ` carlos at redhat dot com 2014-11-29 22:30 ` paulo.cesar.pereira.de.andrade at gmail dot com 2015-03-17 22:50 ` paulo.cesar.pereira.de.andrade at gmail dot com 2015-03-18 17:21 ` paulo.cesar.pereira.de.andrade at gmail dot com 2015-03-18 17:26 ` paulo.cesar.pereira.de.andrade at gmail dot com 2020-05-06 16:30 ` romain.geissler at amadeus dot com 2020-05-06 16:54 ` carlos at redhat dot com 2020-07-03 16:18 ` carlos at redhat dot com 2020-07-03 16:18 ` carlos at redhat dot com 2020-07-21 14:48 ` s at martinien dot de 2020-12-27 18:31 ` romain.geissler at amadeus dot com 2020-12-27 18:33 ` romain.geissler at amadeus dot com 2021-03-03 22:29 ` san+sourceware at smederijmerlijn dot nl 2021-04-01 21:16 ` hi-angel at yandex dot ru 2021-07-06 11:08 ` marat at slonopotamus dot org 2021-08-10 13:03 ` romain.geissler at amadeus dot com 2021-10-21 19:21 ` cvs-commit at gcc dot gnu.org 2021-10-21 19:23 ` adhemerval.zanella at linaro dot org 2023-11-24 7:24 ` fweimer at redhat dot com
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-17645-131@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).