Commit 743fbdb
Herton R. Krzesinski
redhat/configs: enable in kernel compression/decompression of compressed modules
JIRA: https://issues.redhat.com/browse/RHEL-79278
Upstream Status: git@gitlab.com:cki-project/kernel-ark.git
Conflicts: CONFIG_MODULE_COMPRESS file is in rhel directory on
c10s/rhel10, move it to redhat/configs/common/generic
commit 4e86f3d57a23ad39306a4a75a71fa0bbf25be76c
Author: Herton R. Krzesinski <herton@redhat.com>
Date: Mon Feb 17 16:51:56 2025 -0300
redhat/configs: enable in kernel compression/decompression of compressed modules
Our packaging for some time has shipped modules compressed with xz.
These are decompressed by modprobe/kmod on userspace, then provided to the
kernel.
However, the kernel for some time now supports in-kernel decompression since
the change b1ae6dc ("module: add in-kernel support for decompressing").
Doing in kernel decompression is better as pointed out by Andrew Zaborowski in
RHEL-79278: it allows kmod to use the finit_module() syscall, which allows the
kernel to better detect concurrent loading of modules preventing spikes in usage
of memory/vmalloc memory. The prevention of memory spikes/usage in concurrent
module loading was handled by Linus in commit 9b9879f ("modules: catch
concurrent module loads, treat them as idempotent"). But we are not able to take
advantage of this fix if we don't have in kernel decompression of modules enabled,
since kmod will not use finit_module() as the module is compressed and it
fallbacks to init_module().
Thus, make sure we enable in-kernel decompression of modules, which requires to
enable MODULE_COMPRESS: the key here is to keep MODULE_COMPRESS_ALL disabled,
which allows us to keep our current build infra-structure/spec file untouched,
since we build and compress the modules by ourselves and in the proper order
required due module signing. At the same time, it should allow external modules
to continue to be built without interference of enabling compress/decompress.
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>1 parent b84e90b commit 743fbdb
File tree
6 files changed
+4
-3
lines changed- redhat/configs
- common/generic
- rhel/generic
6 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
This file was deleted.
0 commit comments