bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/11447] New: default section layout should be improved to reduce


From: tglek at mozilla dot com
Subject: [Bug ld/11447] New: default section layout should be improved to reduce pagefaults
Date: 29 Mar 2010 20:29:31 -0000

I graphed pagefaults on firefox startup which showed that there some bonus page
faults caused by the default section order. The main problem is backwards io
which always causes page faults.
For reference click the second rectange in
http://people.mozilla.com/~tglek/startup/systemtap_graphs/visualize.html?#ld_bug/log.txt.html
x-axis is file offset, y-axis is time

Log of the sections being read is in
http://people.mozilla.com/~tglek/startup/systemtap_graphs/ld_bug/report.txt

Fault #1: This likely can't fixed in ld, but mentioning it in case
Going through the log chronologically there the problems are:
.bss is being zeroed which causes copy-on-write io.  Then .dynamic is being
read. The fix should be in the dynamic linker to read .dynamic before memset.
This would allow binaries(where distance between .dynamic and .bss is smaller
than the kernel's readhead) to avoid the .bss pagefault. Perhaps .dynamic should
be the last section before .bss?
Alternatively ld could force .bss to point past the end of the file.

Fault #2
.gnu.version* should be in front of .dyn(sym|str)

Fault #3
.dynstr should be in front of .dynsym


Would be nice if .eh_frame* could be in front of .fini, but as far as I can tell
these have to be in different segments.

-- 
           Summary: default section layout should be improved to reduce
                    pagefaults
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: tglek at mozilla dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11447

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]