lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-03-27 13:46    [W:0.032 / U:4.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site