* [to-be-updated] kallsyms-unroll-24-bit-sequence-reconstruction-in-get_symbol_seq.patch removed from -mm tree
@ 2026-10-11 15:16 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-11 15:16 UTC (permalink / raw)
To: mm-commits, thunder.leizhen, thomas.weissschuh, rostedt, pmladek,
olsajiri, nsc, nathan, mcgrof, masahiroy, ljs, kees, geert,
denis.benato, david.laight.linux, chewi, andrey.grodzovsky,
abelvesa, jim.cromie, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2905 bytes --]
The quilt patch titled
Subject: kallsyms: unroll 24-bit sequence reconstruction in get_symbol_seq()
has been removed from the -mm tree. Its filename was
kallsyms-unroll-24-bit-sequence-reconstruction-in-get_symbol_seq.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Jim Cromie <jim.cromie@gmail.com>
Subject: kallsyms: unroll 24-bit sequence reconstruction in get_symbol_seq()
Date: Tue, 29 Sep 2026 12:07:32 -0600
kallsyms_seqs_of_names[] stores 3-byte big-endian sequence indices that
map alphabetical symbol positions to address-ordered symbol records.
Currently, get_symbol_seq() reconstructs each 24-bit integer using a
3-iteration for-loop that shifts and bitwise-ORs each byte sequentially.
During binary search in kallsyms_lookup_names() and duplicate boundary
scans, this loop introduces branch and loop overhead on the hot lookup
path.
Mark get_symbol_seq() as static inline and unroll the 3-byte extraction
into direct byte shifts: (p[0] << 16) | (p[1] << 8) | p[2]. This
eliminates loop induction variable maintenance and allows the compiler to
generate direct loads and constant shifts.
Link: https://lore.kernel.org/20260929-ksyms-tune-v7-3-be568ceef41e@gmail.com
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Kees Cook <kees@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Andrey Grodzovsky <andrey.grodzovsky@crowdstrike.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: David Laight <david.laight.linux@gmail.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Abel Vesa <abelvesa@kernel.org>
Cc: Denis Benato <denis.benato@linux.dev>
Cc: James Le Cuirot <chewi@gentoo.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nsc@kernel.org>
Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
kernel/kallsyms.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- a/kernel/kallsyms.c~kallsyms-unroll-24-bit-sequence-reconstruction-in-get_symbol_seq
+++ a/kernel/kallsyms.c
@@ -185,14 +185,11 @@ unsigned long kallsyms_sym_address(int i
return (unsigned long)offset_to_ptr(kallsyms_offsets + idx);
}
-static unsigned int get_symbol_seq(int index)
+static inline unsigned int get_symbol_seq(int index)
{
- unsigned int i, seq = 0;
+ const u8 *p = &kallsyms_seqs_of_names[3 * index];
- for (i = 0; i < 3; i++)
- seq = (seq << 8) | kallsyms_seqs_of_names[3 * index + i];
-
- return seq;
+ return (p[0] << 16) | (p[1] << 8) | p[2];
}
static int kallsyms_lookup_names(const char *name,
_
Patches currently in -mm which might be from jim.cromie@gmail.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-11 15:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11 15:16 [to-be-updated] kallsyms-unroll-24-bit-sequence-reconstruction-in-get_symbol_seq.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.