[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190327124520.GN3189@techsingularity.net>
Date: Wed, 27 Mar 2019 12:45:20 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mikhail Gavrilov <mikhail.v.gavrilov@...il.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
Qian Cai <cai@....pw>, linux-mm@...ck.org, vbabka@...e.cz,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Correct zone boundary handling when resetting pageblock
skip hints
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
Powered by blists - more mailing lists