Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
To: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	Zaslonko Mikhail <zaslonko@linux.vnet.ibm.com>
Subject: Re: [PATCH] makedumpfile: Error on re-filtering the dump file with no free pages
Date: Thu, 18 May 2017 14:02:54 +0200	[thread overview]
Message-ID: <20170518140254.3db3f205@TP-holzheu> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9701ED89ED@BPXM01GP.gisp.nec.co.jp>

Am Thu, 18 May 2017 04:37:20 +0000
schrieb Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>:

> Hello Zaslonko,
> 
> > When re-filtering the dump file after the free pages have already been
> > stripped out we get an error "Can't get necessary symbols for excluding
> > free pages" if newly specified dump level is below 16 (preserves free
> > pages).
> > According to the code, the check for the new dump level is done BEFORE
> > the new dump level is actually set (based on the dump level specified in
> > the command and the one from the input dump file).
> > Moving the new_dump_level calculation ahead would fix the error.
> 
> Well, I guess the real problem is different.
> The error you said is printed by exclude_free_page():
> 
>         if ((SYMBOL(node_data) == NOT_FOUND_SYMBOL)
>             && (SYMBOL(pgdat_list) == NOT_FOUND_SYMBOL)
>             && (SYMBOL(contig_page_data) == NOT_FOUND_SYMBOL)) {
>                 ERRMSG("Can't get necessary symbols for excluding free pages.\n");
>                 return FALSE;
>         }
> 
> I think the availability of these symbols are not related to free pages.
> exclude_free_page() is called if info->page_is_buddy is null, I estimate that
> this situation occurs only if the kernel is older(2.6.16 or before). 
> 
> However, I don't think you use such too old kernel, so I suspect that
> setup_page_is_buddy() should be updated for newer kernel.

Mikhail is on vacation now - so I try to explain:

The test case is as follows:

 1) We have a -d31 filtered dump "dump.d31"
 2) We want to compress the dump with "makedumpfile -c dump.31 dump31.compressed"

This fails with:

makedumpfile -c dump.31 dump.31.compressed
Excluding unnecessary pages        : [100.0 %]
exclude_free_page: Can't get necessary symbols for excluding free pages.
dump_level is changed to 31, because dump.31 was created by dump_level(31).
makedumpfile Failed.

The problem is that setup_page_is_buddy() is not called in this case because
info->dump_level is still 0 since it was not adjusted early enough:

        if (info->dump_level & DL_EXCLUDE_FREE)
                setup_page_is_buddy();

Because it is not set info->page_is_buddy is NULL and therefore the following
if condition gets true:

        if ((info->dump_level & DL_EXCLUDE_FREE) && !info->page_is_buddy)
                if (!exclude_free_page(cycle))
                        return FALSE;

Since we don't have the symbols in VMCOREINFO (and IMHO don't need it?) the
exclude_free_page() functions fails with the described error message.

So our fix is to adjust the info->level before setup_page_is_buddy() is called.

Best Regards
Michael

> Could you tell me your kernel version and how to reproduce this issue ?



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

  reply	other threads:[~2017-05-18 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 15:02 [PATCH] makedumpfile: Error on re-filtering the dump file with no free pages Zaslonko Mikhail
2017-05-18  4:37 ` Atsushi Kumagai
2017-05-18 12:02   ` Michael Holzheu [this message]
2017-05-19  2:35     ` Atsushi Kumagai
2017-05-19  7:27       ` Michael Holzheu

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=20170518140254.3db3f205@TP-holzheu \
    --to=holzheu@linux.vnet.ibm.com \
    --cc=ats-kumagai@wm.jp.nec.com \
    --cc=kexec@lists.infradead.org \
    --cc=zaslonko@linux.vnet.ibm.com \
    /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