From: robert.richter@cavium.com (Robert Richter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: mm: Fix memmap to be initialized for the entire section
Date: Fri, 9 Dec 2016 15:52:34 +0100 [thread overview]
Message-ID: <20161209145234.GB14257@rric.localdomain> (raw)
In-Reply-To: <ffaa77c7-8982-524f-f624-e4463a463daf@huawei.com>
On 09.12.16 21:15:12, Yisheng Xie wrote:
> For invalid pages, their zone and node information is not initialized, and it
> do have risk to trigger the BUG_ON, so I have a silly question,
> why not just change the BUG_ON:
We need to get the page handling correct. Modifying the BUG_ON() just
hides that something is wrong.
-Robert
> -----------
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6de9440..af199b8 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1860,12 +1860,13 @@ int move_freepages(struct zone *zone,
> * Remove at a later date when no bug reports exist related to
> * grouping pages by mobility
> */
> - VM_BUG_ON(page_zone(start_page) != page_zone(end_page));
> + VM_BUG_ON(early_pfn_valid(start_page) && early_pfn_valid(end_page) &&
> + page_zone(start_page) != page_zone(end_page));
> #endif
>
> for (page = start_page; page <= end_page;) {
> /* Make sure we are not inadvertently changing nodes */
> - VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page);
> + VM_BUG_ON_PAGE(early_pfn_valid(page) && (page_to_nid(page) != zone_to_nid(zone)), page);
>
> if (!pfn_valid_within(page_to_pfn(page))) {
> page++;
next prev parent reply other threads:[~2016-12-09 14:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 18:21 [PATCH v2] arm64: mm: Fix memmap to be initialized for the entire section Robert Richter
2016-12-01 16:45 ` Will Deacon
2016-12-01 17:26 ` James Morse
2016-12-02 7:11 ` Robert Richter
2016-12-02 14:48 ` James Morse
2016-12-02 14:49 ` [PATCH 0/2] Hibernate fixes for 'Fix memmap to be initialized for the entire section' James Morse
2016-12-02 14:49 ` [PATCH 1/2] arm64: mm: Mark nomap regions with the PG_reserved flag James Morse
2016-12-02 14:49 ` [PATCH 2/2] arm64: hibernate: report nomap regions as being pfn_nosave James Morse
2016-12-05 15:42 ` [PATCH 0/2] Hibernate fixes for 'Fix memmap to be initialized for the entire section' Ard Biesheuvel
2016-12-06 17:38 ` Will Deacon
2016-12-07 9:06 ` Robert Richter
2016-12-07 14:32 ` Will Deacon
2016-12-09 12:14 ` [PATCH v2] arm64: mm: Fix memmap to be initialized for the entire section Yisheng Xie
2016-12-09 12:19 ` Ard Biesheuvel
2016-12-09 12:23 ` Hanjun Guo
2016-12-09 13:15 ` Yisheng Xie
2016-12-09 14:52 ` Robert Richter [this message]
2016-12-12 12:02 ` Ard Biesheuvel
2016-12-09 14:51 ` Robert Richter
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=20161209145234.GB14257@rric.localdomain \
--to=robert.richter@cavium.com \
--cc=linux-arm-kernel@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