This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: ldconfig speedup
- From: Michael Schroeder <mls at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Andreas Jaeger <aj at suse dot de>, "GNU C. Library" <libc-alpha at sources dot redhat dot com>
- Date: Tue, 26 Jun 2007 16:50:02 +0200
- Subject: Re: RFC: ldconfig speedup
- References: <hoodj33zj5.fsf@reger.suse.de> <20070626142811.GB4603@sunsite.mff.cuni.cz>
On Tue, Jun 26, 2007 at 04:28:11PM +0200, Jakub Jelinek wrote:
> On Tue, Jun 26, 2007 at 10:12:14AM +0200, Andreas Jaeger wrote:
> > my colleague Michael Schröder improved ldconfig with an incremental mode
> > using a second cache that records inode number and times of a library
> > and then skips a library if it notices that the library is unchanged.
> >
> > His patch adds a second cache below the current two ones. I'm appending
> > his patch - and would like to have your comments on it. I plan to
> > rework the patch this week and get it ready for inclusion and would
> > therefore need to know what you think about it.
> >
> > Also, should we add a third cache - or just increase the CACHE_VERSION
> > and change the second cache to include the new data?
>
> Can't we just stick the extra data into a separate file in /etc, which
> will go along with /etc/ld.so.cache? This kind of data is only useful
> for ldconfig itself and not for ld.so. Enlarging it (especially adding
> the data inline into the second cache, but to some extent even appending
> it to the file) will affect ld.so performance.
One file has the advantage that everything stays in sync. The lookup
speed shouldn't change that much, as ld.so uses a binary search
and thus never even looks at the extra data. But there's indeed a
tiny overhead, as the mmap() will map a couple more pages (24K on my
system), but it's just the single mmap call, not the lookup that is
slower.
Cheers,
Michael.
--
Michael Schroeder mls@suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}