linux/kernel/module
Luis Chamberlain 25a1b5b518 modules/kmod: replace implementation with a semaphore
Simplify the concurrency delimiter we use for kmod with the semaphore.
I had used the kmod strategy to try to implement a similar concurrency
delimiter for the kernel_read*() calls from the finit_module() path
so to reduce vmalloc() memory pressure. That effort didn't provide yet
conclusive results, but one thing that became clear is we can use
the suggested alternative solution with semaphores which Linus hinted
at instead of using the atomic / wait strategy.

I've stress tested this with kmod test 0008:

time /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008

And I get only a *slight* delay. That delay however is small, a few
seconds for a full test loop run that runs 150 times, for about ~30-40
seconds. The small delay is worth the simplfication IMHO.

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2023-04-18 11:15:24 -07:00
..
debug_kmemleak.c
decompress.c module/decompress: Never use kunmap() for local un-mappings 2023-03-22 16:12:35 -07:00
internal.h module: add a for_each_modinfo_entry() 2023-03-24 11:05:15 -07:00
kallsyms.c module: Ignore L0 and rename is_arm_mapping_symbol() 2023-04-13 17:15:50 -07:00
Kconfig module/decompress: Support zstd in-kernel decompression 2022-12-07 12:05:05 -08:00
kdb.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
kmod.c modules/kmod: replace implementation with a semaphore 2023-04-18 11:15:24 -07:00
livepatch.c
main.c module: fix kmemleak annotations for non init ELF sections 2023-04-14 09:36:22 -07:00
Makefile module: fold usermode helper kmod into modules directory 2023-03-24 11:33:08 -07:00
procfs.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
signing.c
strict_rwx.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
sysfs.c module: remove redundant module_sysfs_initialized variable 2022-11-11 10:19:52 -08:00
tracking.c module: tracking: Keep a record of tainted unloaded modules only 2022-10-10 12:16:19 -07:00
tree_lookup.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
version.c