]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Read mm index node content on demand
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 21 Oct 2024 16:38:51 +0000 (18:38 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 24 Oct 2024 04:27:01 +0000 (23:27 -0500)
commit1fa0b27acbc58eaacea48ab7edf295db463291b6
tree908b451a5356f8cd2f169fd94438804d8ff350a4
parentcab7ddd5ddeb597acfcfa229c0ca7152a21ed034
libkmod: Read mm index node content on demand

Many values are never needed, so only parse them on demand. Also keep
pointers into memory-mapped area without copying data into dynamically
sized structs, which allows nodes to be kept on stack.

Improves performance of `modprobe -c` by around 3 %.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/201
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-index.c