* [PATCH] makedumpfile: show needed memory
@ 2013-08-28 22:08 Cliff Wickman
2013-09-13 3:00 ` Atsushi Kumagai
0 siblings, 1 reply; 2+ messages in thread
From: Cliff Wickman @ 2013-08-28 22:08 UTC (permalink / raw)
To: d.hatayama, kumagai-atsushi; +Cc: kexec
From: Cliff Wickman <cpw@sgi.com>
If there is not enough memory available to run in cyclic mode display
how much more would be needed to do so.
Diffed against makedumpfile-1.5.4
Signed-off-by: Cliff Wickman <cpw@sgi.com>
---
makedumpfile.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: makedumpfile-1.5.4/makedumpfile.c
===================================================================
--- makedumpfile-1.5.4.orig/makedumpfile.c
+++ makedumpfile-1.5.4/makedumpfile.c
@@ -7778,11 +7778,15 @@ plenty_of_memory(void)
{
unsigned long free_size;
unsigned long needed_size;
+ long slack = 10; /* 10M extra */
+ long meg = 1024*1024;
free_size = get_free_memory_size();
- needed_size = (info->max_mapnr * 2) / BITPERBYTE;
- if (free_size > (needed_size + (10*1024*1024)))
+ needed_size = ((info->max_mapnr * 2) / BITPERBYTE) + (slack * meg);
+ if (free_size > needed_size)
return 1;
+ PROGRESS_MSG("Need %ldM more memory to use noncyclic mode.\n",
+ (needed_size - free_size)/meg);
return 0;
}
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] makedumpfile: show needed memory
2013-08-28 22:08 [PATCH] makedumpfile: show needed memory Cliff Wickman
@ 2013-09-13 3:00 ` Atsushi Kumagai
0 siblings, 0 replies; 2+ messages in thread
From: Atsushi Kumagai @ 2013-09-13 3:00 UTC (permalink / raw)
To: cpw; +Cc: d.hatayama, kexec
Hello Cliff,
(2013/08/29 7:08), Cliff Wickman wrote:
> From: Cliff Wickman <cpw@sgi.com>
>
> If there is not enough memory available to run in cyclic mode display
> how much more would be needed to do so.
>
> Diffed against makedumpfile-1.5.4
> Signed-off-by: Cliff Wickman <cpw@sgi.com>
This patch depends on your "use non-cyclic when possible"
and it was rejected, I'll reject this patch too.
Thanks
Atsushi Kumagai
> ---
> makedumpfile.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> Index: makedumpfile-1.5.4/makedumpfile.c
> ===================================================================
> --- makedumpfile-1.5.4.orig/makedumpfile.c
> +++ makedumpfile-1.5.4/makedumpfile.c
> @@ -7778,11 +7778,15 @@ plenty_of_memory(void)
> {
> unsigned long free_size;
> unsigned long needed_size;
> + long slack = 10; /* 10M extra */
> + long meg = 1024*1024;
>
> free_size = get_free_memory_size();
> - needed_size = (info->max_mapnr * 2) / BITPERBYTE;
> - if (free_size > (needed_size + (10*1024*1024)))
> + needed_size = ((info->max_mapnr * 2) / BITPERBYTE) + (slack * meg);
> + if (free_size > needed_size)
> return 1;
> + PROGRESS_MSG("Need %ldM more memory to use noncyclic mode.\n",
> + (needed_size - free_size)/meg);
> return 0;
> }
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-13 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 22:08 [PATCH] makedumpfile: show needed memory Cliff Wickman
2013-09-13 3:00 ` Atsushi Kumagai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox