public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: non-cyclic default
@ 2013-05-15 18:43 Cliff Wickman
  2013-05-21  0:36 ` HATAYAMA Daisuke
  2013-05-21  2:15 ` Atsushi Kumagai
  0 siblings, 2 replies; 4+ messages in thread
From: Cliff Wickman @ 2013-05-15 18:43 UTC (permalink / raw)
  To: kexec; +Cc: d.hatayama, kumagai-atsushi

From: Cliff Wickman <cpw@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@sgi.com>
---
 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");

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] makedumpfile: non-cyclic default
  2013-05-15 18:43 [PATCH] makedumpfile: non-cyclic default Cliff Wickman
@ 2013-05-21  0:36 ` HATAYAMA Daisuke
  2013-05-21  2:15 ` Atsushi Kumagai
  1 sibling, 0 replies; 4+ messages in thread
From: HATAYAMA Daisuke @ 2013-05-21  0:36 UTC (permalink / raw)
  To: Cliff Wickman; +Cc: kumagai-atsushi, kexec

(2013/05/16 3:43), Cliff Wickman wrote:
> From: Cliff Wickman <cpw@sgi.com>
>
> Make non-cyclic the default, as it is faster.
>

Default behaviour should not be changed so easily, and I think 
performance of cyclic mode can be improved to some amount because 
cyclic-mode shows slow result even if the number of cycles is 1...

> Dumping a 1TB memory is successful with a crashkernel=512M.
> And allow -Y on the command line, as well as --non-cylic.

Is the '-Y' definitely necessary? I'm thinking this is hideded 
intentionally.

-- 
Thanks.
HATAYAMA, Daisuke


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] makedumpfile: non-cyclic default
  2013-05-15 18:43 [PATCH] makedumpfile: non-cyclic default Cliff Wickman
  2013-05-21  0:36 ` HATAYAMA Daisuke
@ 2013-05-21  2:15 ` Atsushi Kumagai
  2013-05-21  2:53   ` Jingbai Ma
  1 sibling, 1 reply; 4+ messages in thread
From: Atsushi Kumagai @ 2013-05-21  2:15 UTC (permalink / raw)
  To: cpw; +Cc: d.hatayama, kexec

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

> From: Cliff Wickman <cpw@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@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");

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] makedumpfile: non-cyclic default
  2013-05-21  2:15 ` Atsushi Kumagai
@ 2013-05-21  2:53   ` Jingbai Ma
  0 siblings, 0 replies; 4+ messages in thread
From: Jingbai Ma @ 2013-05-21  2:53 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: d.hatayama, kexec, cpw, jingbai.ma

On 05/21/2013 10:15 AM, Atsushi Kumagai wrote:
> On Wed, 15 May 2013 13:43:59 -0500
> Cliff Wickman<cpw@sgi.com>  wrote:
>
>> From: Cliff Wickman<cpw@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@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.
>

I second leave default mode to cyclic. It's difficult to guess how much 
memory the secondary kernel needed. The memory requirement from 
different device driver also be very different, especially on machines 
with many I/O cards.
So we don't know if the memory is enough for non-cyclic.

Once we have kernel 3.9 and kexec-tools-2.0.4, We will have enough 
memory above 4GB address. And then, the next question will be how much 
memory we should reserve for crashkernel.

>
> 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");
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec


-- 
Thanks,
Jingbai Ma

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-21  2:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 18:43 [PATCH] makedumpfile: non-cyclic default Cliff Wickman
2013-05-21  0:36 ` HATAYAMA Daisuke
2013-05-21  2:15 ` Atsushi Kumagai
2013-05-21  2:53   ` Jingbai Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox