From: Mel Gorman <mgorman@techsingularity.net>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>, Qian Cai <cai@lca.pw>,
linux-mm@kvack.org, vbabka@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Correct zone boundary handling when resetting pageblock skip hints
Date: Wed, 27 Mar 2019 12:45:20 +0000 [thread overview]
Message-ID: <20190327124520.GN3189@techsingularity.net> (raw)
In-Reply-To: <084b92cd-94e9-f8e5-cce1-862d984c8eac@arm.com>
On Wed, Mar 27, 2019 at 05:47:06PM +0530, Anshuman Khandual wrote:
> > @@ -267,20 +268,26 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source,
> > get_pageblock_migratetype(page) != MIGRATE_MOVABLE)
> > return false;
> >
> > + /* Ensure the start of the pageblock or zone is online and valid */
> > + block_pfn = pageblock_start_pfn(pfn);
> > + block_page = pfn_to_online_page(max(block_pfn, zone->zone_start_pfn));
> > + if (block_page) {
> > + page = block_page;
> > + pfn = block_pfn;
> > + }
> > +
> > + /* Ensure the end of the pageblock or zone is online and valid */
> > + block_pfn += pageblock_nr_pages;
> > + block_pfn = min(block_pfn, zone_end_pfn(zone) - 1);
> > + end_page = pfn_to_online_page(block_pfn);
> > + if (!end_page)
> > + return false;
>
> Should not we check zone against page_zone() from both start and end page here.
The lower address has the max(block_pfn, zone->zone_start_pfn) and the
upper address has the min(block_pfn, zone_end_pfn(zone) - 1) check to
keep the PFN within the zone boundary.
--
Mel Gorman
SUSE Labs
prev parent reply other threads:[~2019-03-27 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 8:54 Mel Gorman
2019-03-27 12:17 ` Anshuman Khandual
2019-03-27 12:45 ` Mel Gorman [this message]
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=20190327124520.GN3189@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=cai@lca.pw \
--cc=daniel.m.jordan@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mikhail.v.gavrilov@gmail.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