kdump service takes a few seconds to start even no need to rebuild initramfs,
which is a little longer compared to other systemd services, it may affects
the system boot time a little, we better optimize it as possible as we can.
The main root cause of this is the use of "lsinitrd" which is time-consuming.
This series is mainly reducing the "lsinitrd" uses.
The time data in this series is on Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz.
After this series, kdump service start time in case of no initramfs rebuild
is 1s~2s, it should be good enough considering the service is indeed running
parallelly with others.
Before this patchset:
$ time kdumpctl start
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m5.156s
user 0m5.169s
sys 0m1.269s
After this patchset:
$ time kdumpctl start
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m1.151s
user 0m1.028s
sys 0m0.300s
There are still two lsinitrd operations(each consumes around 0.35s) remaining,
we can reconsider it if there are still complaints in the future.
Xunlei Pang (4):
kdumpctl: remove is_mode_switched()
kdumpctl: improve check_wdt_modified()
kdumpctl: update check_dump_fs_modified() to use "lsinitrd -f"
kdumpctl: improve "while read" time for /etc/kdump.conf
kdumpctl | 115 +++++++++++++++++++++++++++++++--------------------------------
1 file changed, 57 insertions(+), 58 deletions(-)
--
1.8.3.1