public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
To: cpw@sgi.com
Cc: d.hatayama@jp.fujitsu.com, kexec@lists.infradead.org
Subject: Re: [PATCH] makedumpfile: show needed memory
Date: Fri, 13 Sep 2013 12:00:08 +0900	[thread overview]
Message-ID: <52327FB8.4010208@mxc.nes.nec.co.jp> (raw)
In-Reply-To: <E1VEnuJ-0000KK-Qu@eag09.americas.sgi.com>

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

      reply	other threads:[~2013-09-13  3:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 22:08 [PATCH] makedumpfile: show needed memory Cliff Wickman
2013-09-13  3:00 ` Atsushi Kumagai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52327FB8.4010208@mxc.nes.nec.co.jp \
    --to=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=cpw@sgi.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox