Re: [PATCH] kernel: fix start-up time degradation caused by strings command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daisuke, 
On Wed, Mar 23, 2022 at 08:09:49AM +0000, d.hatayama@xxxxxxxxxxx wrote:
> verify_namelist() uses strings command and scans full part of vmlinux
> file to find linux_banner string. However, vmlinux file is quite large
> these days, reaching over 500MB. As a result, this degradates start-up
> time of crash command 10 or more seconds. (Of course, this depends on
> machines you use for investigation, but I guess typically we cannot
> use such powerful machines to investigate crash dump...)
> 
> To resolve this issue, let's use bfd library and read linux_banner
> string in vmlinux file directly.
> 
> A simple benchmark shows the following result:
> 
> Without the fix:
> 
>     # cat ./commands.txt
>     quit
>     # time ./crash -i ./commands.txt \
>         /usr/lib/debug/lib/modules/5.16.15-201.fc35.x86_64/vmlinux \
>         /var/crash/*/vmcore >/dev/null 2>&1
> 
>     real        0m20.251s
>     user        0m19.022s
>     sys 0m1.054s
> 
> With the fix:
> 
>     # time ./crash -i ./commands.txt \
>         /usr/lib/debug/lib/modules/5.16.15-201.fc35.x86_64/vmlinux \
>         /var/crash/*/vmcore >/dev/null 2>&1
> 
>     real        0m6.528s
>     user        0m6.143s
>     sys 0m0.431s
> 
> Note that this commit keeps the original logic that uses strings
> command for backward compatibility for in case.

I tested this patch with my vmcore (over 10G).

Before this patch:

time ./crash -i ./commands.txt /root/t/vmlinux-5.4.119-1-gamematrix-015e /root/t/vmcore > /dev/null 2>&1

real    1m19.052s
user    1m17.333s
sys     0m1.675s

After:
#time ./crash -i ./commands.txt /root/t/vmlinux-5.4.119-1-gamematrix-015e /root/t/vmcore > /dev/null 2>&1

real    1m16.609s
user    1m14.655s
sys     0m1.903s


It seems this patch does not improve too much.

Thanks
Huang Shijie

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux