Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH] makdumpfile: clean up the in-accurate message printing about mmap
Date: Thu, 17 Mar 2016 14:57:28 +0800	[thread overview]
Message-ID: <20160317065728.GC29484@x1.redhat.com> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9701E32706@BPXM01GP.gisp.nec.co.jp>

On 03/17/16 at 06:46am, Atsushi Kumagai wrote:
> Hello Baoquan,
> 
> >mmap() is not used either caused by failure of mmap() in initialize_mmap(),
> >or because user explictly specify '--non-mmap'. So the message need be changed
> >according these different cases.
> >
> >Signed-off-by: Baoquan He <bhe@redhat.com>
> 
> Sounds reasonable, thanks.
> 
> Acked-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>

Thanks!

> 
> >---
> > makedumpfile.c | 19 +++++++++++--------
> > 1 file changed, 11 insertions(+), 8 deletions(-)
> >
> >diff --git a/makedumpfile.c b/makedumpfile.c
> >index fa0b779..5703369 100644
> >--- a/makedumpfile.c
> >+++ b/makedumpfile.c
> >@@ -3949,14 +3949,17 @@ out:
> > 	if (info->dump_level & DL_EXCLUDE_FREE)
> > 		setup_page_is_buddy();
> >
> >-	if (info->flag_usemmap == MMAP_TRY && initialize_mmap()) {
> >-		DEBUG_MSG("mmap() is available on the kernel.\n");
> >-		info->flag_usemmap = MMAP_ENABLE;
> >-	} else {
> >-		DEBUG_MSG("The kernel doesn't support mmap(),");
> >-		DEBUG_MSG("read() will be used instead.\n");
> >-		info->flag_usemmap = MMAP_DISABLE;
> >-        }
> >+	if (info->flag_usemmap == MMAP_TRY ) {
> >+		if (initialize_mmap()) {
> >+			DEBUG_MSG("mmap() is available on the kernel.\n");
> >+			info->flag_usemmap = MMAP_ENABLE;
> >+		} else {
> >+			DEBUG_MSG("The kernel doesn't support mmap(),");
> >+			DEBUG_MSG("read() will be used instead.\n");
> >+			info->flag_usemmap = MMAP_DISABLE;
> >+		}
> >+        } else if (info->flag_usemmap == MMAP_DISABLE)
> >+		DEBUG_MSG("mmap() is disabled by specified option '--non-mmap'.\n");
> >
> > 	return TRUE;
> > }
> >--
> >2.5.0
> 

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

      reply	other threads:[~2016-03-17  6:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  7:12 [PATCH] makdumpfile: clean up the in-accurate message printing about mmap Baoquan He
2016-03-17  6:46 ` Atsushi Kumagai
2016-03-17  6:57   ` Baoquan He [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=20160317065728.GC29484@x1.redhat.com \
    --to=bhe@redhat.com \
    --cc=ats-kumagai@wm.jp.nec.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