Go to file
Philipp Rudo 24edf00fb8 kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val
Resolves: https://issues.redhat.com/browse/RHEL-137945
Upstream: kdump-utils
Conflict: None

commit b43908c20f5a028c60b0096006a26a6e52a01279
Author: Philipp Rudo <prudo@redhat.com>
Date:   Wed Jan 14 15:54:25 2026 +0100

    kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val

    Rewriting kdump_get_conf_val in Bash lead to a massive performance
    regression. On my test system starting the kdump service took

    $ time kdumpctl start
    real    0m13.134s
    user    0m8.828s
    sys     0m7.450s

    which is ~20 times slower compared to kdump-utils-1.0.59-1.fc44 with

    $ time kdumpctl start
    real    0m0.641s
    user    0m0.208s
    sys     0m0.538s

    Looking at the traces shows that this is caused because Bash now has to
    handle the whole kdump.conf, including the extensive comment at the
    start, every time kdump_get_conf_val is called. This is done multiple
    times when starting the kdump service and is often cloaked by other
    functions, e.g. is_ssh_dump_target() or get_save_path().

    To fix the issue remove comments and empty lines in a regex again so
    that the Bash code only has to handle valid config entries. With this
    change alone the performance is almost as good as the original version
    with

    $ time kdumpctl start
    real    0m0.780s
    user    0m0.330s
    sys     0m0.604s

    In the long run it would make sense to also reduce the number of calls
    to kdump_get_conf_val.

    This patch also fixes the issue that subsequent blanks are replaced by a
    single space. Usually this is not an issue but there are corner cases,
    e.g. in printf-like format strings passed as an argument, where the new
    behaviour is undesirable.

    Fixes: d81109c ("kdump-lib-initramfs: rewrite kdump_get_conf_val")
    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
2026-01-20 13:44:29 +01:00
.gitignore Rebase to v1.0.58 2025-09-29 14:27:08 +08:00
0001-Strip-surrounding-quotes-from-configuration-values.patch Strip surrounding quotes from configuration values 2025-11-03 15:16:24 +08:00
0002-unit-tests-Add-case-for-quoted-configuration-values.patch Strip surrounding quotes from configuration values 2025-11-03 15:16:24 +08:00
0003-Allow-kdump.service-to-access-LUKS-volume-keys.patch A few fixes on kdump LUKS support 2025-11-10 11:53:57 +08:00
0004-Restore-SELinux-label-of-crypttab-file.patch A few fixes on kdump LUKS support 2025-11-10 11:53:57 +08:00
0005-Allow-sudo-kdumpctl-for-LUKS-dump-target.patch A few fixes on kdump LUKS support 2025-11-10 11:53:57 +08:00
0006-Revert-Strip-surrounding-quotes-from-configuration-v.patch Rewrite kdump_get_conf_val 2025-12-09 11:34:44 +08:00
0007-kdump-lib-initramfs-rewrite-kdump_get_conf_val.patch Rewrite kdump_get_conf_val 2025-12-09 11:34:44 +08:00
0008-Add-persisent-device-if-FIPS-is-enabled.patch Add persisent device if FIPS is enabled 2025-12-15 16:54:42 +08:00
0009-kdump.sh-Centralize-the-F-suboption-handling.patch Skip num-threads when -E and -F option is present 2025-12-17 08:49:42 +08:00
0010-kdump.sh-Centralize-the-num-threads-sub-option-handl.patch Skip num-threads when -E and -F option is present 2025-12-17 08:49:42 +08:00
0011-kdump.sh-Skip-num-threads-when-E-and-F-option-is-pre.patch Skip num-threads when -E and -F option is present 2025-12-17 08:49:42 +08:00
0012-powerpc-consider-CPU-count-while-calculating-crashke.patch powerpc: Set nr_cpus=16 for kdump kernel 2025-12-17 10:47:32 +08:00
0013-powerpc-Set-nr_cpus-16-for-kdump-kernel.patch powerpc: Set nr_cpus=16 for kdump kernel 2025-12-17 10:47:32 +08:00
0014-kexec-kdump-howto.txt-update-paragraphs-related-to-d.patch kexec-kdump-howto.txt: update paragraphs related to disable_cpu_apicid 2025-12-31 11:38:08 +08:00
0015-kdump-lib-initramfs-Fix-performance-regression-in-kd.patch kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val 2026-01-20 13:44:29 +01:00
gating.yaml Enable gating test 2024-07-10 10:16:34 +08:00
kdump-utils.spec kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val 2026-01-20 13:44:29 +01:00
README.md Initial import for CentOS Stream 10 2024-07-10 09:26:11 +08:00
sources Rebase to v1.0.58 2025-09-29 14:27:08 +08:00

kdump-utils

The kdump-utils package