Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jan 2011 23:49:11 -0500
From:      Alexander Kabaev <kabaev@gmail.com>
To:        Mark Saad <nonesuch@longcount.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: rtld optimizations
Message-ID:  <20110125234911.223d8f75@kan.dnsalias.net>
In-Reply-To: <AANLkTikwHteyqMfMpy_B-AxQ5ZQ_Z3RKhkNpGN23fXtX@mail.gmail.com>
References:  <AANLkTikwHteyqMfMpy_B-AxQ5ZQ_Z3RKhkNpGN23fXtX@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/qv9ymm95AA3elad7fvJWoMH
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

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

> Hello Hackers
>=20
> The NetBSD folks have a nice improvement with the rtld-elf subsystem,
> known as "Negative Symbol Cache" .
>=20
> http://blog.netbsd.org/tnf/entry/netbsd_runtime_linker_gains_negative
>=20
>  Roy Marples roy@ has a simple write up of the change.
>=20
> 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.
>=20
> 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.
>=20

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.

--=20
Alexander Kabaev

--Sig_/qv9ymm95AA3elad7fvJWoMH
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iD8DBQFNP6fMQ6z1jMm+XZYRApDcAJ9Qo4tdIl4xVxTwK+k61vAWxX7ZFwCeJNbs
9Bha2Y0q9hEBtn/L7WpwA2E=
=0nHC
-----END PGP SIGNATURE-----

--Sig_/qv9ymm95AA3elad7fvJWoMH--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110125234911.223d8f75>