DUP_FAILED_MODULES - TRACKS DUPLICATE FAILED MODULES(9)
π NAME
dup_failed_modules β tracks duplicate failed modules, bestie. It's a Kernel API Manual page, section (9), so buckle up π
β¨ DESCRIPTION β¨
Okay so picture this: a linked list of modules that failed to load, and the reason they failed is lowkey iconic β there was already an existing module with the same name that was either still being processed or already loaded. Like, the audacity π
Now here's the tea: the finit_module system call incurs heavy virtual memory allocations. And in the worst case, a finit_module system call can end up allocating virtual memory 3 times:
kernel_read_file_from_fdcall usesvmalloc- optional module decompression uses
vmap layout_and allocatecan usevzallocor an arch specific variation ofvmallocto deal with ELF sections requiring special permissions
In practice on a typical boot today, most finit_module calls fail due to the module with the same name already being loaded or about to be processed. And all that virtual memory allocated to these failed modules? Just freed with no functional use. Poof. Gone. Wasted. π No cap.
To help with this, dup_failed_modules allows us to track modules which failed to load due to the fact that a module was already loaded or being processed. And here's the thing β there are only two points at which we can fail such calls. We list them below along with the number of virtual memory allocation calls:
- a)
FAIL_DUP_MOD_BECOMINGβ at the end ofearly_mod_checkbeforelayout_and_allocate.- with module decompression: 2 virtual memory allocation calls
- without module decompression: 1 virtual memory allocation calls
- b)
FAIL_DUP_MOD_LOADβ afterlayout_and_allocateonadd_unformed_module.- with module decompression 3 virtual memory allocation calls
- without module decompression 2 virtual memory allocation calls
We should strive to get this list to be as small as possible, fr fr. If this list is not empty it is a reflection of possible work or optimizations possible either in-kernel or in userspace. Basically a to-do list the kernel is serving us and honestly? Obsessed with the honesty π₯
π SEE ALSO
- Kernel file
./kernel/module/stats.cmodule debugging statisticsoverview(9), module statistics debugfscounters(9)
π«Ά And that's the whole vibe. This little masterpiece lives in ./kernel/module and it's stamped October 2026 β save the date, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms