From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Mel Gorman <mgorman@techsingularity.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] mm, page_alloc: move_freepages should not examine struct page of reserved memory
Date: Tue, 13 Aug 2019 14:16:30 -0700 [thread overview]
Message-ID: <20190813141630.bd8cee48e6a83ca77eead6ad@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1908122036560.10779@chino.kir.corp.google.com>
On Mon, 12 Aug 2019 20:37:11 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:
> After commit 907ec5fca3dc ("mm: zero remaining unavailable struct pages"),
> struct page of reserved memory is zeroed. This causes page->flags to be 0
> and fixes issues related to reading /proc/kpageflags, for example, of
> reserved memory.
>
> The VM_BUG_ON() in move_freepages_block(), however, assumes that
> page_zone() is meaningful even for reserved memory. That assumption is no
> longer true after the aforementioned commit.
>
> There's no reason why move_freepages_block() should be testing the
> legitimacy of page_zone() for reserved memory; its scope is limited only
> to pages on the zone's freelist.
>
> Note that pfn_valid() can be true for reserved memory: there is a backing
> struct page. The check for page_to_nid(page) is also buggy but reserved
> memory normally only appears on node 0 so the zeroing doesn't affect this.
>
> Move the debug checks to after verifying PageBuddy is true. This isolates
> the scope of the checks to only be for buddy pages which are on the zone's
> freelist which move_freepages_block() is operating on. In this case, an
> incorrect node or zone is a bug worthy of being warned about (and the
> examination of struct page is acceptable bcause this memory is not
> reserved).
I'm thinking Fixes:907ec5fca3dc and Cc:stable? But 907ec5fca3dc is
almost a year old, so you were doing something special to trigger this?
next prev parent reply other threads:[~2019-08-13 21:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 3:37 [patch] mm, page_alloc: move_freepages should not examine struct page of reserved memory David Rientjes
2019-08-13 13:03 ` Vlastimil Babka
2019-08-13 17:22 ` David Rientjes
2019-08-14 7:42 ` Vlastimil Babka
2019-08-13 21:16 ` Andrew Morton [this message]
2019-08-13 23:31 ` David Rientjes
2019-08-14 22:49 ` Andrew Morton
2019-08-19 13:35 ` Mel Gorman
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=20190813141630.bd8cee48e6a83ca77eead6ad@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).