[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJfuBxxLOi0tB=-ZuWeO1aw3CEQHcWr5CbaSf9u6PyvzcZNuqw@mail.gmail.com>
Date: Fri, 23 Jan 2026 16:33:57 -0700
From: jim.cromie@...il.com
To: Daniel Gomez <da.gomez@...nel.org>
Cc: Petr Pavlu <petr.pavlu@...e.com>, Luis Chamberlain <mcgrof@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>, Aaron Tomlin <atomlin@...mlin.com>,
linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/1] module: speed modprobe by adding name_crc to
struct module
On Fri, Jan 23, 2026 at 3:32 AM Daniel Gomez <da.gomez@...nel.org> wrote:
>
> On 2026-01-23 10:36, Petr Pavlu wrote:
> > On 1/23/26 12:46 AM, Jim Cromie wrote:
> > > "modprobe foo" currently does strcmp on the name, this can be improved.
> > >
> > > So this commit:
> > >
> > > 1. adds name_crc to struct module
> > > 2. modpost.c computes the value and
> > > 3. outputs it for "modinfo foo" to see/use.
> > >
> > > 4. adds hotpath to find_module_all()
> > > this uses name_crc to do quick "name-check"
> > > falls back to strcmp only to guard against collisions.
> > >
> > > This should significantly reduce modprobe workload, and shorten module
> > > load-time.
> > >
> > > Since it alters struct module, its binary incompatible. This means:
> > >
> > > 1. RFC for its wide "blast radius".
> > > 2. suitable for major version bump *only*
> > >
> > > 3. it opens door for further struct module reorg, to:
> > > a. segregate fields by "temperature"
> > > b. pack out paholes.
> > > c. improve cache locality (by reordering coldest on bottom)
> > > name should be cold now.
> > > bikeshedding is appropriate here.
> > >
> > > NB: this isn't a substitute for CONFIG_MODULE_SIG.
> > > It reimplements crc_le(), doesn't reuse kernel's version.
> > >
> > > CC: Luis Chamberlain <mcgrof@...nel.org>
> > > CC: Petr Pavlu <petr.pavlu@...e.com>
> > > CC: Daniel Gomez <da.gomez@...nel.org>
> > > CC: Sami Tolvanen <samitolvanen@...gle.com>
> > > CC: Aaron Tomlin <atomlin@...mlin.com>
> > > CC: linux-modules@...r.kernel.org
> > >
> > > Signed-off-by: Jim Cromie <jim.cromie@...il.com>
> > >
> > > '#' will be ignored, and an empty message aborts the commit.
> >
> > This patch looks as if it were generated by AI. If so, please avoid
> > sending such changes. Otherwise, the commit description should explain
>
> FYI, this is a process already documented. You can check out what maintainers
> expect from contributions and possible guidelines:
>
> https://lore.kernel.org/all/20260119200418.89541-1-dave.hansen@linux.intel.com/
Thanks, from LWN, I knew the topic was being discussed, but I was
unaware of its resolution.
FTR, I did argue with the AI, it gave me the crc_le() fn, which let me
proceed and test the patch.
Powered by blists - more mailing lists