Re: [GIT PULL] tracing: Updates for 7.2
From: Linus Torvalds
Date: Fri Jun 19 2026 - 18:29:07 EST
On Fri, 19 Jun 2026 at 12:07, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Now, we're not exactly doing great in this area, I'm afraid. To pick a
> random small core kernel file, we have this kind of disgusting
> situation:
Actually, we have much worse cases.
Doing a "make allmodconfig" will do all those '*.mod.c" files, which
are tiny generated files that just have some mod-info structure etc
for linking into the module.
They're like ten lines of code. MODULE_INFO() and a 'struct module'
that gets linked in with the actual code. Auto-generated by
scropts/mod/modpost.c.
And then they have
#include <linux/module.h>
#include <linux/export-internal.h>
#include <linux/compiler.h>
and those three lines of include make them balloon into 3MB of code,
so building those *tiny* things takes forever.
(Where "forever" is obviously relative - but it's disgustingly long
for something that should be instant).
In fact, just a single
#include <linux/module.h>
and absolutely nothing else, will give you 2.8MB of output.
(In contrast, the two other headers we include - export-internal.h and
compiler.h - result in 13kB of output. Yesh, it's 550 lines of pretty
random stuff, but it's not really all that bad. It's mostly just
really core type declarations, so it's all quite understandable)
That module.h header situation is beyond disgusting - and yes, it's
very much noticeable in my build time. Adding some module maintainer
people, because this is bad, and I think it needs to be fixed.
Linus