Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diskdump: use mmap/madvise to improve the start-up
Sometimes, the size of bitmap in vmcore can be very large, such as over 256M. This patch uses mmap/madvise to improve the performance of reading bitmap in the non-FLAT_FORMAT code path. Without the patch: #echo 3 > /proc/sys/vm/drop_caches; #time ./crash -i ./commands.txt /root/t/vmlinux /root/t/vmcore > /dev/null 2>&1 ............................ real 0m55.217s user 0m15.114s sys 0m3.560s ............................ With the patch: #echo 3 > /proc/sys/vm/drop_caches; #time ./crash -i ./commands.txt /root/t/vmlinux /root/t/vmcore > /dev/null 2>&1 ............................ real 0m44.097s user 0m19.031s sys 0m1.620s ............................ Note: Test files: vmlinux: 272M vmcore : 23G (bitmap_len: 4575985664) #cat ./commands.txt quit Signed-off-by: Huang Shijie <[email protected]>
- Loading branch information