Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3196873ybi; Mon, 29 Jul 2019 02:35:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqynCiJjwqXLxoG0PNr3O5SuXwm0a5PUargYB260qug4gkzlIS0Cn3OoA2w9FLZDkCA/0Sd4 X-Received: by 2002:a17:902:244:: with SMTP id 62mr15369920plc.243.1564392919878; Mon, 29 Jul 2019 02:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564392919; cv=none; d=google.com; s=arc-20160816; b=SDeLQBqm0WMLAhglTRI9qGWjvTBkdGtHTaBl2iNoaVaj3wN9u9VCpbXXRvAKQGN9ZU O40Xy/2Vr5tIYAYTbZDzodB8h07Ppf1a6a9PCwpNZUGyW6XM+8qoCYOezjuymergM6HF noaqANxFA/A1oC/CEIUfhs1UhI4xafbSOr7L1qOh4XrX+rp2t/C/QvJCGEg4nlvBWpWs 4Ne6JoggBsM3589SU03BtmJLDjh05Z0zcErhN1mSeRScLrUF+zOEpXwhZRJU3CknQGHj d9Jvqz4NoegVCoipylu/sF+F9FGeGl38UiScUta4k0xvQGYnCPVeyog5oe8FhqCVc11a acRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=GbQD+NQzpNYdvCeXSDoU44vwY5qR02vwvWZY2Y2V8Xs=; b=wdwOK9W6TfCzTmnynz71s9Jk3yFPifQoIr7sX/kcrQAX2uXClbsYAa5cN/0iXrd5IO EHLAOPP1ynvD/RBE0wmjjfWr/Gim+fHi29NZGW4uPcXEcYgzsj6A1Y47K0uYJvttkGDy 8NSYpi6T49bL9Aupma6Kn6BPluZ+YFt9OjCGqk7LmMOJ92cg8NxOkGD3YvMgi5EmZ/YY AUUlVifrQGoZS9vW/M6HyPm/rqE1jrPn/zIhtwM7mzU5BvGgg9/VWcqzfjFPlDbb1HYS E3s+Cf+xHPI7GYH0zFzW0m56iV4K1J6Ls2Ho8ynRBCetQXB+2sSQjSCf2dFlC/lK1VCS HACw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Pyv87Ytl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186si27270569pgc.248.2019.07.29.02.35.04; Mon, 29 Jul 2019 02:35:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Pyv87Ytl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbfG2Jdj (ORCPT + 99 others); Mon, 29 Jul 2019 05:33:39 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:46481 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfG2Jdj (ORCPT ); Mon, 29 Jul 2019 05:33:39 -0400 Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x6T9XVJ7003071; Mon, 29 Jul 2019 18:33:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x6T9XVJ7003071 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1564392812; bh=GbQD+NQzpNYdvCeXSDoU44vwY5qR02vwvWZY2Y2V8Xs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pyv87YtlEC8J7FRdnY4xxIHsdzjGj9PzI0JEIkvXnzAS/MWQTFI4nAFEivuneIDmR 0VLUO+nD1Tb1oi9Ey2ClOsrsmehhrfeXg4oTynbbCcXP146gUORQlifnZNgUbYWLjL qeX0WVdtm6v7cXg/Pvdcf1OrC0UA1jtDsVEj3mjJihFWn1ggU+kbwvUkwfNkKxCekz e7Jz7lVUu2JtzUHNBO3wwxvlJzffOXM/t3QbS/twIsUCDBkT4aEvzatDVXh/LKUh8b LRHvgfX+gZECWgmhL/WMtBNQ1bDtSRjX0IzhGoHwvxWUCMAtOSMlqWwBOuT4WbZxVE zriJGpygB7KkA== X-Nifty-SrcIP: [209.85.222.44] Received: by mail-ua1-f44.google.com with SMTP id z13so23705297uaa.4; Mon, 29 Jul 2019 02:33:32 -0700 (PDT) X-Gm-Message-State: APjAAAXa7oihszkzxr6aJpBkKC4DlW/ja70oh535GEmCAdmoS+liaED3 B0p7rvVHrvaMDbClHQ+H/NgaeaSa9NR+qKYuGyU= X-Received: by 2002:ab0:5ea6:: with SMTP id y38mr67487725uag.40.1564392811271; Mon, 29 Jul 2019 02:33:31 -0700 (PDT) MIME-Version: 1.0 References: <20190714152817.24693-1-efremov@linux.com> <20190728100906.18847-1-efremov@linux.com> <20190729151351.24f9eeb9@canb.auug.org.au> In-Reply-To: From: Masahiro Yamada Date: Mon, 29 Jul 2019 18:32:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] modpost: check for static EXPORT_SYMBOL* functions To: Denis Efremov Cc: Stephen Rothwell , Michal Marek , Emil Velikov , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 6:16 PM Denis Efremov wrote: > > > Just a reminder that some of us (just me?) do well over 100+ builds per > > day ... if this can be optimised some what that would be good. > > These measurements for the worst case (allmodconfig). Is it possible to > measure the slowdown in your case? How it will perform on your typical > workflow? > > Looks like it is possible to optimize it, but I need some hints from > Masahiro on how to do it properly. Because I don't know how to match > __ksymtab_ with the without an additional loop. Right. This is not feasible without an additional loop since we put only exported symbols into the hash table. Perhaps, we could put every symbol into the hash table so that we can quickly look-up from __ksymtab_, but it would consume lots of memory. So, I think the implementation is this patch is good enough. > Introduce another hash table? > > The first loop from this patch could traverse only the exported symbols > instead of all symbols. But in this case, I don't know how to break > early from the loop because there can be many symbols with the same name > but with the different scope (static/non-static). > > For example, ring_buffer_size: > kernel/trace/ring_buffer.c > 4334:unsigned long ring_buffer_size(struct ring_buffer *buffer, int cpu) > 4347:EXPORT_SYMBOL_GPL(ring_buffer_size); > And > drivers/usb/misc/ldusb.c > 125:static int ring_buffer_size = 128; > > Or for, nfs4_disable_idmapping: > fs/nfs/super.c > 2920:bool nfs4_disable_idmapping = true; > 2930:EXPORT_SYMBOL_GPL(nfs4_disable_idmapping); > fs/nfsd/nfs4idmap.c > 48:static bool nfs4_disable_idmapping = true; -- Best Regards Masahiro Yamada