From: "Magnus Damm" <magnus.damm@gmail.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Patch] min_low_pfn and max_low_pfn calcultion fix
Date: Wed, 28 Feb 2007 10:01:00 +0000 [thread overview]
Message-ID: <aec7e5c30702280201p6a002136s91437526424345e2@mail.gmail.com> (raw)
In-Reply-To: <1172619535.20006.334.camel@linux-znh>
On 28 Feb 2007 07:38:55 +0800, Zou Nan hai <nanhai.zou@intel.com> wrote:
>
> Hi,
> We have seen bad_pte_print when testing crashdump on an SN machine in
> recent 2.6.20 kernel.
> There are tons of bad pte print (pfn < max_low_pfn) reports when the
> crash kernel boots up, all those reported bad pages are inside initmem
> range;
> That is because if the crash kernel code and data happens to be at the
> beginning of the 1st node. build_node_maps in discontig.c will bypass
> reserved regions with filter_rsvd_memory. Since min_low_pfn is
> calculated in build_node_map, so in this case, min_low_pfn will be
> greater than kernel code and data.
>
> Because pages inside initmem are freed and reused later, we saw
> pfn_valid check fail on those pages.
>
> I think this theoretically happen on a normal kernel. When I check
> min_low_pfn and max_low_pfn calculation in contig.c and discontig.c.
> I found more issues than this.
>
> 1. min_low_pfn and max_low_pfn calculation is inconsistent between
> contig.c and discontig.c,
> min_low_pfn is calculated as the first page number of boot memmap in
> contig.c (Why? Though this may work at the most of the time, I don't
> think it is the right logic). It is calculated as the lowest physical
> memory page number bypass reserved regions in discontig.c.
> max_low_pfn is calculated include reserved regions in contig.c. It is
> calculated exclude reserved regions in discontig.c.
>
> 2. If kernel code and data region is happen to be at the begin or the
> end of physical memory, when min_low_pfn and max_low_pfn calculation is
> bypassed kernel code and data, pages in initmem will report bad.
>
> 3. initrd is also in reserved regions, if it is at the begin or at the
> end of physical memory, kernel will refuse to reuse the memory. Because
> the virt_addr_valid check in free_initrd_mem.
>
> So it is better to fix and clean up those issues.
> Calculate min_low_pfn and max_low_pfn in a consistent way.
>
> Below is the patch, please review and comments
>
> Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
I've seen similar problems on a HP rx2620 box using 2.6.20. I managed
to resolve that problem with a patch similar to this one, but then I
realized that the issue I was seeing had been solved already by some
mm-related patch by Bob Picco that got included in 2.6.21-rc1.
So, I suspect that 2.6.21-rc1 and rc2 should work just fine without this patch.
/ magnus
PS. Any comments on the EFI_LOADER_DATA for ELF core header would be
greatly appreciated, I think it is sort of related to this issue as
well.
next prev parent reply other threads:[~2007-02-28 10:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-27 23:38 [Patch] min_low_pfn and max_low_pfn calcultion fix Zou Nan hai
2007-02-28 1:48 ` Jay Lan
2007-02-28 10:01 ` Magnus Damm [this message]
2007-03-12 20:35 ` Jay Lan
2007-03-12 22:08 ` Luck, Tony
2007-03-13 19:28 ` Jay Lan
2007-03-14 4:38 ` Magnus Damm
2007-03-14 15:27 ` Jay Lan
2007-03-14 15:55 ` Jay Lan
2007-03-14 18:48 ` Jay Lan
2007-03-15 1:55 ` Horms
2007-03-15 2:11 ` Jay Lan
2007-03-16 5:15 ` Horms
2007-03-20 18:59 ` Jay Lan
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=aec7e5c30702280201p6a002136s91437526424345e2@mail.gmail.com \
--to=magnus.damm@gmail.com \
--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