From: Michael Bohan <mbohan@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: mel@csn.ul.ie, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Michael Bohan <mbohan@quicinc.com>
Subject: Re: [PATCH] arm: mm: Don't free prohibited memmap entries
Date: Tue, 06 Apr 2010 17:33:17 -0700 [thread overview]
Message-ID: <4BBBD2CD.2010205@codeaurora.org> (raw)
In-Reply-To: <20100406220817.GE12831@n2100.arm.linux.org.uk>
On 4/6/2010 3:08 PM, Russell King - ARM Linux wrote:
> 1. are you enabling ARCH_HAS_HOLES_MEMORYMODEL ?
>
Yes, although this does not impact the problem I'm dealing with. That
option is only used for /proc/pagetypeinfo currently. It would be good
if we could consolidate ARCH_HAS_HOLES_MEMORYMODEL and HOLES_IN_ZONE,
but that may be out of scope for this change.
> 2. where does it try to access these page structs without trying
> pfn_valid() to check whether a page struct exists first?
>
The specific piece of code that is causing crashes in my scenario is in
vm/page_alloc.c:move_freepages(), called from move_freepages_block().
The code in move_freepages_block aligns the end_pfn to the closest page
block, which may take us to invalid memmap entries.
The macro that conditionally saves us in this case is the
pfn_valid_within(), called from move_freepages(). If HOLES_IN_ZONE is
configured, this option calls down to pfn_valid() to make sure the page
has a valid memmap entry. There are likely other cases where this is an
issue as well that I haven't run into.
Michael
WARNING: multiple messages have this Message-ID (diff)
From: mbohan@codeaurora.org (Michael Bohan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: mm: Don't free prohibited memmap entries
Date: Tue, 06 Apr 2010 17:33:17 -0700 [thread overview]
Message-ID: <4BBBD2CD.2010205@codeaurora.org> (raw)
In-Reply-To: <20100406220817.GE12831@n2100.arm.linux.org.uk>
On 4/6/2010 3:08 PM, Russell King - ARM Linux wrote:
> 1. are you enabling ARCH_HAS_HOLES_MEMORYMODEL ?
>
Yes, although this does not impact the problem I'm dealing with. That
option is only used for /proc/pagetypeinfo currently. It would be good
if we could consolidate ARCH_HAS_HOLES_MEMORYMODEL and HOLES_IN_ZONE,
but that may be out of scope for this change.
> 2. where does it try to access these page structs without trying
> pfn_valid() to check whether a page struct exists first?
>
The specific piece of code that is causing crashes in my scenario is in
vm/page_alloc.c:move_freepages(), called from move_freepages_block().
The code in move_freepages_block aligns the end_pfn to the closest page
block, which may take us to invalid memmap entries.
The macro that conditionally saves us in this case is the
pfn_valid_within(), called from move_freepages(). If HOLES_IN_ZONE is
configured, this option calls down to pfn_valid() to make sure the page
has a valid memmap entry. There are likely other cases where this is an
issue as well that I haven't run into.
Michael
next prev parent reply other threads:[~2010-04-07 0:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 22:34 [PATCH] arm: mm: Don't free prohibited memmap entries Michael Bohan
2010-04-05 22:34 ` Michael Bohan
2010-04-06 22:08 ` Russell King - ARM Linux
2010-04-06 22:08 ` Russell King - ARM Linux
2010-04-07 0:33 ` Michael Bohan [this message]
2010-04-07 0:33 ` Michael Bohan
2010-04-12 21:11 ` Russell King - ARM Linux
2010-04-12 21:11 ` Russell King - ARM Linux
2010-04-12 22:31 ` Michael Bohan
2010-04-12 22:31 ` Michael Bohan
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=4BBBD2CD.2010205@codeaurora.org \
--to=mbohan@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mbohan@quicinc.com \
--cc=mel@csn.ul.ie \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.