rtld optimizations

Alexander Kabaev kabaev at gmail.com
Wed Jan 26 05:15:31 UTC 2011


On Tue, 25 Jan 2011 21:40:42 -0500
Mark Saad <nonesuch at longcount.org> wrote:

> Hello Hackers
> 
> The NetBSD folks have a nice improvement with the rtld-elf subsystem,
> known as "Negative Symbol Cache" .
> 
> http://blog.netbsd.org/tnf/entry/netbsd_runtime_linker_gains_negative
> 
>  Roy Marples roy@ has a simple write up of the change.
> 
> I took the basic idea from FreeBSD, but improved the performance
> drastically. Basically, the huge win is by caching both breadth and
> depth of the needed/weak symbol lookup.
> Easiest to think of a,b,c,d as a matrix and FreeBSD just cache a row
> where we cache both rows and columns.
> 
> Has anyone looked into porting the changes back to FreeBSD ?  The
> improvement on load time for things like firefox, openoffice, and java
> is huge on NetBSD. It looks like this change could improve load times
> on FreeBSD in the same ways.
> 

This is a second time someone posts this to public mailing list and
curiously enough is a second time it suggested that someone else is to
do the investigation. From the quick look, the commit in question is
more or less a direct rip-off of Donelists we had for ages and as
such is completely over-hyped. The only extra quirk that said commit
does is an optimization of a dlsym() call, which is hardly ever in
critical performance path. Said optimization is trivial and easy to
try. Here you have it:
http://people.freebsd.org/~kan/rtld-symlook-depth.diff

Since it only applies to dlsym, it only affects programs that are heavy
plugin users, which I suppose is the category OpenOffice and firefox
both fall into. Care to do some benchmarks with and without the
patch and report the results? I frankly doubt that you'll see any
noticeable difference compared to our stock rtld's performance.

-- 
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110126/e11743d8/signature.pgp


More information about the freebsd-hackers mailing list