linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Denis Efremov <efremov@linux.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Michal Marek <michal.lkml@markovi.net>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] modpost: check for static EXPORT_SYMBOL* functions
Date: Mon, 29 Jul 2019 18:32:55 +0900	[thread overview]
Message-ID: <CAK7LNATFKv=gm=Q8_0Xqjq4NAb-FL59xY6C3VQ3RXq3NaP2=jQ@mail.gmail.com> (raw)
In-Reply-To: <e2b5607f-0f74-41c6-a83d-5a22d6828778@linux.com>

On Mon, Jul 29, 2019 at 6:16 PM Denis Efremov <efremov@linux.com> 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_<symbol> with the <symbol> 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 <symbol> from __ksymtab_<symbol>,
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

  reply	other threads:[~2019-07-29  9:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 15:28 [RFC PATCH] modpost: check for static EXPORT_SYMBOL* functions Denis Efremov
2019-07-15 14:43 ` Emil Velikov
2019-07-27 12:55 ` Masahiro Yamada
2019-07-27 19:13   ` Denis Efremov
2019-07-28  2:00     ` Masahiro Yamada
2019-07-28 10:09 ` [PATCH] " Denis Efremov
2019-07-29  3:29   ` Masahiro Yamada
2019-07-29  9:51     ` Denis Efremov
2019-07-29  5:13   ` Stephen Rothwell
2019-07-29  9:16     ` Denis Efremov
2019-07-29  9:32       ` Masahiro Yamada [this message]
2019-07-29 12:40       ` Stephen Rothwell
2019-07-29 12:52         ` Denis Efremov
2019-07-29 13:07           ` Stephen Rothwell
2019-07-29  9:22 ` [PATCH v2] " Denis Efremov
2019-07-29 12:20   ` Stephen Rothwell
2019-07-29 12:47     ` Denis Efremov
2019-07-29 14:18 ` [PATCH v3] " Denis Efremov
2019-07-29 22:26   ` Stephen Rothwell
2019-07-30  6:59     ` Denis Efremov
2019-07-30 16:29       ` Masahiro Yamada
2019-07-30 16:44         ` Denis Efremov
2019-07-30 17:21           ` Masahiro Yamada
2019-07-30 18:11 ` [PATCH v4] " Denis Efremov
2019-07-30 18:15   ` Denis Efremov
2019-07-31  8:54   ` Masahiro Yamada
2019-08-01  2:20     ` Masahiro Yamada
2019-08-01  6:17       ` Denis Efremov
2019-08-01  6:06 ` [PATCH v5] " Denis Efremov
2019-08-07 15:12   ` Masahiro Yamada
2019-08-13 16:07     ` Masahiro Yamada
2019-08-13 21:11       ` Denis Efremov

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='CAK7LNATFKv=gm=Q8_0Xqjq4NAb-FL59xY6C3VQ3RXq3NaP2=jQ@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=efremov@linux.com \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=sfr@canb.auug.org.au \
    /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 NNTP newsgroup(s).