[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASvQd8C4UE3Zm9tsSH48w3QKwskyTKn2P8tegBMrV0_ww@mail.gmail.com>
Date: Sat, 12 Oct 2019 13:25:32 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Matthias Maennich <maennich@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Cc: Android Kernel" <kernel-team@...roid.com>,
Jessica Yu <jeyu@...nel.org>,
Martijn Coenen <maco@...roid.com>,
Lucas De Marchi <lucas.de.marchi@...il.com>,
Shaun Ruffell <sruffell@...ffell.net>,
Will Deacon <will@...nel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
linux-modules <linux-modules@...r.kernel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH 4/4] export: avoid code duplication in include/linux/export.h
On Sat, Oct 12, 2019 at 12:43 AM Matthias Maennich <maennich@...gle.com> wrote:
>
> On Fri, Oct 11, 2019 at 05:31:27PM +0200, Greg Kroah-Hartman wrote:
> >On Thu, Oct 10, 2019 at 04:14:43PM +0100, Matthias Maennich wrote:
> >> Now that the namespace value is not part of the __ksymtab entry name
> >> anymore, we can simplify the implementation of EXPORT_SYMBOL*. By
> >> allowing the empty string "" to represent 'no namespace', we can unify
> >> the implementation and drop a lot redundant code. That increases
> >> readability and maintainability.
> >>
> >> As Masahiro pointed out earlier,
> >> "The drawback of this change is, it grows the code size. When the symbol
> >> has no namespace, sym->namespace was previously NULL, but it is now am
> >> empty string "". So, it increases 1 byte for every no namespace
> >> EXPORT_SYMBOL. A typical kernel configuration has 10K exported symbols,
> >> so it increases 10KB in rough estimation."
> >
> >10Kb of non-swapable memory isn't good. But if you care about that, you
> >can get it back with the option to compile away any non-used symbols,
> >and that shouldn't be affected by this change, right?
>
> Rasmus suggested to put the 'aMS' flags on the __ksymtab_strings section
> to mitigate this:
> https://lore.kernel.org/lkml/f2e28d6b-77c5-5fe2-0bc4-b24955de9954@rasmusvillemoes.dk/
>
> I was not yet able to properly test this, so I did not include it in
> this series. As I said in the cover letter, this 4th patch might be
> optional for 5.4. So, we could defer it to a later time when we have
> addressed that properly.
This looks the same as my patch, though.
Reviewed-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists