Subject: Re: Enhancing sysctl support in ld.elf_so
To: Matt Thomas <email@example.com>
From: Andrew Brown <firstname.lastname@example.org>
Date: 06/20/2004 23:13:47
On Sun, Jun 20, 2004 at 03:37:40PM -0700, Matt Thomas wrote:
>At 12:10 PM 6/20/2004, Quentin Garnier wrote:
>>Le Sun, 20 Jun 2004 19:47:02 +0200 (CEST)
>>Jaromir Dolecek a ecrit :
>> > Quentin Garnier wrote:
>> > -- Start of PGP signed section.
>> > > Hi,
>> > >
>> > > I made a patch to make ld.elf_so use the new sysctl API instead of the
>> > > limited functionality it has now.
>> > >
>> > > It's handy, but adds 12k to ld.elf_so.
>> > >
>> > > Comments?
>> > What new features are provided by the new code, besides
>> > using the new sysctl API (which is irrelevant) ?
>>It allows the use of any sysctl variable in /etc/ld.so.conf. I can't say
>>it is a must have, but it's clearly handy in some case, such as with
>>third-party libraries and such that would depend on specific features of
>>That's why I ask if those 12k are worth the feature, but nobody commented
>>on that yet.
>It isn't the 12K that bothers me, it's whether it slows down ld.elf_so
>at all. So, does it slow it down? I assume the sysctlmib is only
>initialized if needed, right??
calling sysctlgetmibinfo() costs at least one call to sysctl() each
time you call it (unless a private mib tree is used) and possibly up
to "n" where "n" is the number of levels deep into the tree you are
looking. caching helps mitigate this for frequent callers, but
ld.elf_so probably won't be a "frequent caller".
|-----< "CODE WARRIOR" >-----|
email@example.com * "ah! i see you have the internet
firstname.lastname@example.org (Andrew Brown) that goes *ping*!"
email@example.com * "information is power -- share the wealth."