On 05/03/2017 at 05:09 PM, Dave Young wrote:
Hi, Xunlei
On 05/03/17 at 01:10pm, Xunlei Pang wrote:
> 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 actually reducing the "lsinitrd" uses.
>
> Tested on Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz.
> 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 (when kdump lsinitrd tmp file exists)
> kexec: loaded kdump kernel
> Starting kdump: [OK]
>
> real 0m0.854s
> user 0m0.389s
> sys 0m0.582s
>
> Xunlei Pang (3):
> kdumpctl: remove is_mode_switched()
> kdumpctl: improve check_wdt_modified()
> introduce kdump lsinitrd support
Nice work, read all the 4 patches, overall they looks good, but for
the third one kdump saved initrd, I'm still not sure if we should add
these, if we add in the future we could add more. Also where to add the
tmp file is also a problem.
With the patch 4, even we do not use patch 3, it will still within 1
second?
It depends on the CPU capacity, on my laptop(4-core 2.60GHz) without patch3
("introduce kdump lsinitrd support"):
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m1.158s
user 0m1.039s
sys 0m0.305s
One single "lsinitrd -f" consumes around 0.6 second on my machine.
> dracut-module-setup.sh | 5 +++
> kdump-lib.sh | 26 +++++++++++++++
> kdumpctl | 88 +++++++++++++++++++++++---------------------------
> mkdumprd | 7 ++++
> 4 files changed, 78 insertions(+), 48 deletions(-)
>
> --
> 1.8.3.1
>
Thanks
Dave