[PATCH] makedumpfile: non-cyclic default

Atsushi Kumagai kumagai-atsushi at mxc.nes.nec.co.jp
Mon May 20 22:15:16 EDT 2013


On Wed, 15 May 2013 13:43:59 -0500
Cliff Wickman <cpw at sgi.com> wrote:

> From: Cliff Wickman <cpw at sgi.com>
> 
> Make non-cyclic the default, as it is faster.
> 
> Dumping a 1TB memory is successful with a crashkernel=512M.
> And allow -Y on the command line, as well as --non-cylic.
> 
> Signed-off-by: Cliff Wickman <cpw at sgi.com>

This change causes the failure due to lack of memory, again.

I think reliability is more important than performance, it's desirable
that anyone can use makedumpfile safely without any considerations.

Only experts who can set "crashkernel" appropriately based on physical
memory size should use --non-cyclic option manually for performance.


Thanks
Atsushi Kumagai

> ---
>  makedumpfile.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> Index: makedumpfile.mmap/makedumpfile.c
> ===================================================================
> --- makedumpfile.mmap.orig/makedumpfile.c
> +++ makedumpfile.mmap/makedumpfile.c
> @@ -8585,13 +8585,14 @@ main(int argc, char *argv[])
>  	initialize_tables();
>  
>  	/*
> -	 * By default, makedumpfile works in constant memory space.
> +	 * By default, makedumpfile makes one pass through page structures.
> +	 * Use --cyclic-buffer to work in constant memory space.
>  	 */
> -	info->flag_cyclic = TRUE;
> +	info->flag_cyclic = FALSE;
>  	
>  	info->block_order = DEFAULT_ORDER;
>  	message_level = DEFAULT_MSG_LEVEL;
> -	while ((opt = getopt_long(argc, argv, "b:cDd:EFfg:hi:lMpRrsvXx:", longopts,
> +	while ((opt = getopt_long(argc, argv, "b:cDd:EFfg:hi:lMpRrsvXx:Y", longopts,
>  	    NULL)) != -1) {
>  		switch (opt) {
>  		case 'A':
> @@ -8694,6 +8695,8 @@ main(int argc, char *argv[])
>  			break;
>  		case 'Z':
>  			info->bufsize_cyclic = atoi(optarg);
> +			if (info->bufsize_cyclic)
> +				info->flag_cyclic = TRUE;
>  			break;
>  		case '?':
>  			MSG("Commandline parameter is invalid.\n");



More information about the kexec mailing list