gethostbyname() and resolv.conf updates

Colin Walters walters at verbum.org
Mon Jun 21 16:02:52 UTC 2010


2010/6/21 Pádraig Brady <P at draigbrady.com>:
>
> Sorry I haven't been following this really, but I loath
> config options that aren't absolutely required, and this
> seems like a place where we could just stat() (cache) always.
> What's the problem with doing that?

I too would be really interested in any real-world application for
which the cost of the stat() was any kind of major performance hit.

> p.s. not having looked at the code,
> the atomic ops seems unusual in the
> presence of the static last_... variables.

We are implicitly relying on aligned word size assignment atomicity
here it looks like, yes.  I haven't looked if there are other places
in glibc doing this or if there's some infrastructure for it.  To be
clear this patch is derived from the OpenSUSE one; I didn't change the
semantics there.


More information about the devel mailing list