From: Ingo Molnar <mingo@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nathan Chancellor <nathan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Ard Biesheuvel <ardb@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [ANNOUNCE] "Fast Kernel Headers" Tree -v2
Date: Sat, 22 Jan 2022 10:18:08 +0100 [thread overview]
Message-ID: <YevL0IdQB0tVlcgf@gmail.com> (raw)
In-Reply-To: <CAK8P3a2XPwG7rP+TFdEYH7tutE7Zat5vf7PuV2idESZsrxBXyA@mail.gmail.com>
* Arnd Bergmann <arnd@arndb.de> wrote:
> > If we include comments & line-markers then the bloat goes up by another
> > ~2x:
> >
> > kepler:~/mingo.tip.git> ./st include/linux/sched.h
> > #include <linux/sched.h> | LOC: 2,186 | headers: 118
> > kepler:~/mingo.tip.git> ./st include/linux/sched.h
> > #include <linux/sched.h> | LOC: 4,092 | headers: 0
>
> The metric I've been focusing on is bytes of the preprocessed header,
> which is more sensitive to function definitions that get generated from
> macros, and I multiply this by the number of inclusions (from scanning
> the .file.o.cmd files). It probably helps to have a couple of metrics and
> look at all of them occasionally to not miss something important.
Actual inclusions don't just depend on .file.o.cmd files though, that won't
catch indirect inclusions, right?
> In the meantime, I have made some progress on reducing the headers
> for arm64, on top of your tree from Jan 8, but I have not looked at
> later changes from your side, and I need to work on this a bit more
> to ensure this doesn't break other architectures.
Sure & great!
> For an arm64 allmodconfig build, my additional improvements on top
> of yours are significant but not as good as I had hoped for, this
> can still improve I hope:
>
> 5.16-rc8-vanilla 32640 seconds user, 3286 seconds sys
> 5.16-rc8-mingo 22990 seconds user, 2304 seconds sys
> 5.16-rc8-arnd 19007 seconds user, 1853 seconds sys
~71% build throughput speedup for allmodconfig is very impressive to me. :-)
> As my tree builds any randconfig cleanly, [...]
Yeah, same here - having a few thousand randconfig build tests is normal
for each version:
/* This file is auto generated, version 3288 */
#define UTS_MACHINE "x86_64"
#define UTS_VERSION "#3288 Fri Jan 14 18:20:14 CET 2022"
My testing is mostly concentrated on x86 - but I often test ARM64
randconfig as well.
> I keep looking at different configs and find that this has a big impact,
> some options end up eliminating most of the benefits until I add further
> changes to clean up certain files. This happened with kasan, kprobes, and
> lse-atomics for instance. After eliminating all circular includes, I was
> also able to revisit my old script to visualize the inclusions, see[1]
> for the current arm64 defconfig output. This version uses my arbitrary
> metric as font-size, and uses labels for the number of inclusions.
This is really nice!
I was concentrating on optimizing a generic distro config - which doesn't
include the tons of extreme instrumentation measures that allmodconfig
includes but production distro kernels rarely do.
allmodconfig definitely needs more work, but 71% is a pretty good starting
point ...
Feel free to send in patches, I can help with the testing too.
Thanks,
Ingo
next prev parent reply other threads:[~2022-01-22 9:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-08 16:26 [ANNOUNCE] "Fast Kernel Headers" Tree -v2 Ingo Molnar
2022-01-10 22:03 ` Arnd Bergmann
2022-01-11 16:23 ` Arnd Bergmann
2022-01-11 17:08 ` David Laight
2022-01-13 8:27 ` Ingo Molnar
2022-01-13 9:20 ` Arnd Bergmann
2022-01-19 12:31 ` Ingo Molnar
2022-01-19 17:20 ` Arnd Bergmann
2022-01-22 9:18 ` Ingo Molnar [this message]
2022-01-13 8:57 ` Ingo Molnar
2022-01-13 10:16 ` Arnd Bergmann
2022-03-15 10:35 ` [TREE] "Fast Kernel Headers" Tree -v3 Ingo Molnar
2022-03-22 7:59 ` Kari Argillander
2022-03-22 15:37 ` Randy Dunlap
2022-03-22 16:22 ` Kari Argillander
2022-03-22 19:03 ` Kari Argillander
2023-11-04 9:07 ` Lucas Tanure
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=YevL0IdQB0tVlcgf@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=jpoimboe@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
/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).