Re: [PATCH 0/3] kallsyms: Accelerate symbol name lookups by ~19x
From: jim . cromie
Date: Tue Sep 22 2026 - 00:45:50 EST
On Mon, Sep 21, 2026 at 5:07 PM Kees Cook <kees@xxxxxxxxxx> wrote:
>
> On Sat, Sep 19, 2026 at 09:58:54PM -0600, Jim Cromie wrote:
> > Memory footprint: +573 KiB .rodata for kallsyms_names_offsets (191k
> > symbols * 3 bytes on x86_64 defconfig), minus ~2 KiB from dropping
> > kallsyms_markers[].
>
> The speed-up is impressive, but I have to say 500KB is not exactly
> trivial. It's not _huge_, but it's not small. Is the rate of symbol
> lookups in the kernel high enough to justify this loss of memory?
>
IIUC the use is quite lumpy.
so a dynamic allocation could solve all the problems.
1- 32 bit table, since 24 bit fiddling is silly on table thats freed soon.
2- can do David Laights stride-2 thing almost for free
3 - 0 bytes rodata
4 - no conflict with Lorenzo's patchset - no touches to scripts/kallsyms.c
It could be batch-loaded and freed, w fallback to existing slow search.
or left around till OOM
I will play with this.
> --
> Kees Cook