From 7dd2b03e3616218a9d090fd512ca0f6b22aa13dc Mon Sep 17 00:00:00 2001 From: Nexoniarz Date: Mon, 14 Sep 2026 08:06:20 +0200 Subject: [PATCH] ldls: what 110 modules ask for at init, in order of how many ask Counting stub calls turned out to be the wrong metric -- one module walking an rbtree called rb_first sixty-four times and told us nothing. Counting how many *modules* need a symbol is the useful one: __kmem_cache_create_args 25 crypto_register_template 11 _printk 10 crypto_register_alg 10 __register_nls 9 ... Forty-four distinct symbols carry all 110 modules through init_module. Small enough to be a plan rather than an estimate, and not a number anyone could have guessed: the slab allocator at the top and a long tail of registration calls that mostly want to record a pointer and return zero. It says nothing about probe(), which is where the real surface is and which the kernel rather than the module is supposed to call. That is L2. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2 --- docs/plan/ldls.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/plan/ldls.md b/docs/plan/ldls.md index 70cd413..345fa49 100644 --- a/docs/plan/ldls.md +++ b/docs/plan/ldls.md @@ -345,6 +345,32 @@ The 22 are not failures of the loader; they are drivers that needed an allocation to come back non-null. The 29 without an entry point are mostly library modules that exist to be depended on. +### And what it says about the work queue + +Counting *calls* is the wrong metric — one module walking an rbtree called +`rb_first` sixty-four times and told us nothing. Counting **how many modules +need a symbol** is the useful one, and over 110 modules it comes to this: + +| symbol | modules | +|---|---| +| `__kmem_cache_create_args` | 25 | +| `crypto_register_template` | 11 | +| `_printk` | 10 | +| `crypto_register_alg` | 10 | +| `__register_nls` | 9 | +| `crypto_register_shash` | 4 | +| `af_alg_register_type` | 4 | +| `register_filesystem`, `misc_register`, … | 2 each | + +**Forty-four distinct symbols would carry every one of those 110 modules +through `init_module`.** That is a small enough number to be a plan rather than +an estimate, and it is not a number anybody could have guessed — the slab +allocator at the top, and a long tail of registration calls that mostly want to +record a pointer and return zero. + +It says nothing about `probe()`, which is where the real surface is and which +the kernel, not the module, is supposed to call. Reaching that is L2. + --- ## What it will not do