This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: On glibc's resolver


Hi Siddhesh,

On Wed, 26 Dec 2012, Siddhesh Poyarekar wrote:

* Linux-specific: Use the kernel notify interface (or something similar) to asynchronously reinitialize the resolver when a change is detected.

* Memory map resolv.conf and iterate through the nameservers
 everytime, like we do for hosts.  Really bad for performance and
 hence I'd think this would get a 'no'.

Why not share a small memory segment among all processes with the resolv.conf contents in binary form. Whenever a process parses resolv.conf, it should also update the SHM file. So it would be updated by firefox or networkmanager, or whoever calls res_init(), but all processes will profit. Optionally re-parsing could happen without even res_init(), but on the first timeout. Since this would be system wide, the overhead will be for a single process only.


I'm thinking that ideally all caching of resolved and unresolvable names should happen in a common place for all processes, and this could happen with shared memory better than with separate daemon. But I'm probably taking this too far.


Thanks, Dimitris






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]