From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100704 invoked by alias); 17 Mar 2015 22:50:11 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 100399 invoked by uid 48); 17 Mar 2015 22:50:07 -0000 From: "paulo.cesar.pereira.de.andrade at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/17645] RFE: Improve performance of dynamic loader for deeply nested DSO dependencies. Date: Tue, 17 Mar 2015 22:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paulo.cesar.pereira.de.andrade at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00181.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17645 Paulo Andrade changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7972|0 |1 is obsolete| | --- Comment #8 from Paulo Andrade --- Created attachment 8193 --> https://sourceware.org/bugzilla/attachment.cgi?id=8193&action=edit Proposed patch Updated proposed patch, without ChangeLog entry, just for asking for extra comments. I understand this patch touches a too sensible part of glibc, and the only reason I wrote it is due to the test case, where the proposed patch runs 5+ orders of magnitude faster, and appears to be fully functional, when tested in fedora and running very complex applications. This is basically the same patch, but now it scans the list in reverse order. This is is actually the correct way to do it, so that on most common/simple cases/cycles it outputs the same sorting as current glibc. But I would like to have one clarification, that maybe is being already tested, and the Makefile patch to have only one result is in fault. tst-initorder is basically this: a2 a1 # a2 is linked to a1 b2 b1 a2 # b2 is linked to b1 and a2 a3 b2 b1 # a3 is linked to b2 and b1 a4 a3 # a4 is linked to a3 main a4 a1 b2 # "main" is linked to a4, a1 and b2 this will cause the sort input like this: [ main a2 a1 b2 b1 a3 a4 ] My question is, is some documentation that says that dsos must be kept together in the ordering? I mean, there are 2 correct results: main a4 a3 b2 b1 a2 a1 and main a4 a3 b2 a2 a1 b1 but if there is some specification that says it should have "b2 b1" together, then the patch is invalid, because it only breaks cycles and does ordering, and if there are no dependencies, it keeps it in the order it received the list to sort. -- You are receiving this mail because: You are on the CC list for the bug.