[PATCH 1/6] nss: Introduce <nss_module.h>

Siddhesh Poyarekar siddhesh@gotplt.org
Fri Nov 20 08:43:11 GMT 2020


On 11/11/20 3:15 AM, DJ Delorie via Libc-alpha wrote:
> 
>  From 588a52bf1638019fb2aff66a7194cb4ff843f04f Mon Sep 17 00:00:00 2001
> From: Florian Weimer <fweimer@redhat.com>
> Date: Wed, 19 Feb 2020 20:55:48 +0100
> Subject: [PATCH 1/6] nss: Introduce <nss_module.h>
> 
> This provides the struct nss_module type, which combines the old
> struct service_library type with the known_function tree, by
> statically allocating space for all function pointers.
> 
> struct nss_module is fairly large (536 bytes), but it will be
> shared across NSS databases.  The old known_function handling
> had non-some per-function overhead (at least 32 bytes per looked-up
> function, but more for long function anmes), so overall, this is not
> too bad.  Resolving all functions at load time simplifies locking,
> and the repeated lookups should be fast because the caches are hot
> at this point.
> ---
>   malloc/set-freeres.c |   3 +
>   nss/Makefile         |   2 +-
>   nss/function.def     | 126 +++++++++---------
>   nss/nss_module.c     | 304 +++++++++++++++++++++++++++++++++++++++++++
>   nss/nss_module.h     |  93 +++++++++++++
>   5 files changed, 467 insertions(+), 61 deletions(-)
>   create mode 100644 nss/nss_module.c
>   create mode 100644 nss/nss_module.h

This is OK.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>



More information about the Libc-alpha mailing list