[Crash-utility] [PATCH v2] diskdump: use mmap/madvise to improve the start-up

Huang Shijie shijie at os.amperecomputing.com
Wed Apr 6 10:32:58 UTC 2022


Hi Kazu,
On Wed, Apr 06, 2022 at 02:07:47AM +0000, HAGIO KAZUHITO(萩尾 一仁) wrote:
> -----Original Message-----
> > 1.) The bitmap of vmcore file can be very big in the server kernel panic,
> >     such as over 256M.
> > 
> >     This patch uses mmap/madvise to improve the read speed
> >     of the bitmap in the non-FLAT_FORMAT code path.
> > 
> >     Use MADV_WILLNEED for madvise, it will trigger read ahead for
> >     reading the bitmap.
> 
> Thanks for the update.
> 
> With removing the unused variables (will be fixed when merging),
> Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>
> 
> $ make clean ; make warn
> 
> diskdump.c: In function ‘read_dump_header’:
> diskdump.c:543:10: warning: unused variable ‘bytes_read’ [-Wunused-variable]
>   ssize_t bytes_read;
>           ^~~~~~~~~~
> diskdump.c:542:9: warning: unused variable ‘len’ [-Wunused-variable]
>   size_t len;
>          ^~~
> diskdump.c:541:8: warning: unused variable ‘bufptr’ [-Wunused-variable]
>   char *bufptr;
>         ^~~~~~
Sorry, I did not notice these warnings.

Maybe we can add -Werror to the Makefile...

> 
> As for a second ack, please wait for a while.
> Lianbo is taking a leave and will be back soon.
No problem.


Thanks
Huang Shijie



More information about the Crash-utility mailing list