From: Horms <horms@verge.net.au>
To: linux-ia64@vger.kernel.org
Subject: Zero size /proc/vmcore on ia64
Date: Mon, 05 Feb 2007 01:59:03 +0000 [thread overview]
Message-ID: <20070205015901.GA31446@verge.net.au> (raw)
Hi,
I have been poking around this problem a bit over the past week,
and I thought it would be a good idea to get it out in the open.
At some stage /proc/vmcore (in a crash-kernel) went from being
something useful, to being zero size.
I initially thought this was because saved_max_pfn was not being
set correctly. And indeed it is not set for discontig memory.
But the trivial fix below has not been sufficient to resolve the problem :(
The problem seems to be along the lines of:
* kexec-tool sets up a segment to contain the elf header.
* This segment happens to be almost at the end of the crashkernel area
of memory that is visible to the crash kernel.
* However, when purgatory munges the EFI map, this segment
is marked as EFI_UNUSABLE_MEMORY.
* As a result of this it is not in a range covered by efi_memmap_walk()
* And thus it is outside the range of memory covered by a valid PFN
(remember its at the end of memory, it turns out that the
max PFN covers memory up until just before the header)
* The header can't be read by the vmcore setup code
* And vmcore is uninitialised
read_from_oldmem: error: pfn (32761) > saved_max_pfn (31744)
Kdump: vmcore not initialized
The saved_max_pfn error above is produced by debuging code
that I added to read_from_oldmem().
It also uses the patch below, otherwise saved_max_pfn is 0.
For reference:
I am using today's linus tree (2.6.20)
The problem seems to have been around since at least 2.6.19-rc6
I have a Tiger2 system using disctontig memory
The problem also seems to manifest when using contig memory
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
Set saved_max_pfn when discontig memory is in use.
This sets up saved_max_pfn when disctontig memory is in use.
This mirrors the code for contig memory.
This patch does not entirely solve the problem of making vmcore work,
however it does appear to be neccessary. Please consider applying.
Signed-off-by: Simon Horman <horms@verge.net.au>
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 96722cb..999cefd 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -506,6 +509,12 @@ void __init find_memory(void)
max_pfn = max_low_pfn;
find_initrd();
+
+#ifdef CONFIG_CRASH_DUMP
+ /* If we are doing a crash dump, we still need to know the real mem
+ * size before original memory map is reset. */
+ saved_max_pfn = max_pfn;
+#endif
}
#ifdef CONFIG_SMP
next reply other threads:[~2007-02-05 1:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 1:59 Horms [this message]
2007-02-08 2:07 ` Zero size /proc/vmcore on ia64 Zou, Nanhai
2007-02-08 3:06 ` Horms
2007-02-08 4:21 ` Zou Nan hai
2007-02-08 5:46 ` Vivek Goyal
2007-02-08 7:36 ` Horms
2007-02-08 7:52 ` Zou, Nanhai
2007-02-08 13:07 ` Horms
2007-02-08 23:45 ` Zou, Nanhai
2007-02-13 17:25 ` Bernhard Walle
2007-02-14 8:27 ` Magnus Damm
2007-02-14 9:57 ` Zou, Nanhai
2007-02-14 11:46 ` Magnus Damm
2007-02-15 2:06 ` Zou, Nanhai
2007-02-15 2:17 ` Zou, Nanhai
2007-02-15 3:46 ` Horms
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=20070205015901.GA31446@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-ia64@vger.kernel.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