[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210218192419.GA788573@yury-ThinkPad>
Date: Thu, 18 Feb 2021 11:24:19 -0800
From: Yury Norov <yury.norov@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-arch@...r.kernel.org, linux-sh@...r.kernel.org,
Alexey Klimov <aklimov@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>, David Sterba <dsterba@...e.com>,
Dennis Zhou <dennis@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Jianpeng Ma <jianpeng.ma@...el.com>,
Joe Perches <joe@...ches.com>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Rich Felker <dalias@...c.org>,
Stefano Brivio <sbrivio@...hat.com>,
Wei Yang <richard.weiyang@...ux.alibaba.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: Re: [PATCH 08/14] lib/Kconfig: introduce FAST_PATH option
On Thu, Feb 18, 2021 at 05:15:43PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 17, 2021 at 08:05:06PM -0800, Yury Norov wrote:
> > This series introduces fast paths for find_bit() routines. It is
> > beneficial for typical systems, but those who limited in I-cache
> > may be concerned about increasing the .text size of the Image.
> >
> > To address this concern, one can disable FAST_PATH option in the config
> > and some save memory.
> >
> > The effect of this option on my arm64 next-20210217 build is:
>
> (Maybe bloat-o-meter will give better view on this, i.e. more human-readable)
Never heard about this tool, thanks for the hint.
scripts/bloat-o-meter vmlinux vmlinux.new
add/remove: 16/13 grow/shrink: 111/439 up/down: 3616/-19352 (-15736)
Function old new delta
find_next_bit.constprop - 220 +220
apply_wqattrs_cleanup - 176 +176
memcg_free_shrinker_maps - 172 +172
...
cpuset_hotplug_workfn 2584 2288 -296
task_numa_fault 3640 3320 -320
kmem_cache_free_bulk 1684 1280 -404
Total: Before=26085140, After=26069404, chg -0.06%
The complete output is here:
https://pastebin.com/kBSdVJcK
So if I understand the output correctly, the size of .text is decreased...
Looks weird, but if it's true, we don't need the FAST_BIT config at all
because there's no tradeoff, and I should drop the patch.
Hmm...
> > +config FAST_PATH
>
> I think the name is to broad for this cases, perhaps BITS_FAST_PATH? or BITMAP?
My logic was that since SMALL_CONST() is global, and FAST_PATH
controls the SMALL_CONST, it should also be global. I believe,
Linux should have a global switch to control the behaviour in
such cases, similarly to -Os compiler option. And I was surprized
when I found nothing like FAST_PATH in the config.
What about having FAST_PATH as a global option, and later if someone
will request for granularity, we'll introduce nested configs?
> > + bool "Enable fast path code generation"
> > + default y
> > + help
> > + This option enables fast path optimization with the cost of increasing
> > + the text section.
>
> --
> With Best Regards,
> Andy Shevchenko
>
Powered by blists - more mailing lists