From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dog.birch.relay.mailchannels.net (dog.birch.relay.mailchannels.net [23.83.209.48]) by sourceware.org (Postfix) with ESMTPS id 009013851C22 for ; Fri, 20 Nov 2020 08:43:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 009013851C22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AB4F9341A72; Fri, 20 Nov 2020 08:43:19 +0000 (UTC) Received: from pdx1-sub0-mail-a10.g.dreamhost.com (100-96-9-134.trex.outbound.svc.cluster.local [100.96.9.134]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DF52B341C0D; Fri, 20 Nov 2020 08:43:18 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a10.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.10); Fri, 20 Nov 2020 08:43:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Madly-Army: 6f52191e350d1e70_1605861799403_853427100 X-MC-Loop-Signature: 1605861799403:3979309781 X-MC-Ingress-Time: 1605861799402 Received: from pdx1-sub0-mail-a10.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a10.g.dreamhost.com (Postfix) with ESMTP id A3B927EC15; Fri, 20 Nov 2020 00:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=V10/1Z g8uasDdhD2WlAv1V0fLEA=; b=f+47HSuznxHdhOQ7AV+dISYbVCWn1hLCv51YBM 8wRchsOV9XVEaDpEgSI4TpBzMZXcdIlt9H3Vvt42yIXxWQgeVXlmySbCJNVVB050 D59ZWkN9CwSG27dVzMwqwkpA8OKNMxqA4fZM4oP5U4fHOcxPXwWQIitcPihVNjo1 AyZ9c= Received: from [192.168.1.111] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a10.g.dreamhost.com (Postfix) with ESMTPSA id D92747EFB6; Fri, 20 Nov 2020 00:43:16 -0800 (PST) Subject: Re: [PATCH 1/6] nss: Introduce To: DJ Delorie , libc-alpha@sourceware.org References: X-DH-BACKEND: pdx1-sub0-mail-a10 From: Siddhesh Poyarekar Message-ID: <64d326f0-dfa1-8661-4fa1-7f744b7288de@gotplt.org> Date: Fri, 20 Nov 2020 14:13:11 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2020 08:43:24 -0000 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 > Date: Wed, 19 Feb 2020 20:55:48 +0100 > Subject: [PATCH 1/6] nss: Introduce > > 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