public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: v2 [PATCH 4/4] nsswitch: use new internal API
Date: Thu, 13 Aug 2020 20:16:11 -0400	[thread overview]
Message-ID: <xnpn7ursj8.fsf@greed.delorie.com> (raw)
In-Reply-To: <951021d2-92f5-9da5-db03-04e93e50d98c@redhat.com> (carlos@redhat.com)

"Carlos O'Donell" <carlos@redhat.com> writes:
> The system works perfectly fine, but in the tests I ran the /etc/nsswitch.conf
> doesn't reload.

Heh, yeah, the tests I'm writing also pointed this out.  The complex
lookups seem to work, but the simple ones were cached.

> It doesn't reload because of code like this:

Yup.

> (1) Test covering changing data after reload for host interfaces.
>
> * New container test case that has 2 NSS services for hosts providing
>   different data.

Note that the two services we've used in the past for this do *not* have
host support (just passwd and group) so this will take some time for me
to add support for.

> * Start the test with one set of data and call:
>   * gethostbyname
>   * gethostbyname_r

The non_r functions just call the _r functions, so do we really need to
test both?

> Yes, it means we will stat /etc/nsswitch.conf for every API call, but that
> is in the noise compared to the network costs of going to DNS/LDAP or
> parsing files. I don't think the added stat cost will make much of a difference
> compared to reading and parsing lines from files.

We still have some optimization opportunities for the future, though.
Florian a I decided to keep as much of the internal API the same as
possible for the first pass, so for example, we still look up names by
string compares instead of enums, and still have unneeded layers of
complexity that could be optimized away if they were written
differently.


  reply	other threads:[~2020-08-14  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02  0:32 DJ Delorie
2020-08-13 20:09 ` Carlos O'Donell
2020-08-14  0:16   ` DJ Delorie [this message]
2020-08-27 18:41   ` DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xnpn7ursj8.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).