lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 04/12] mm/hotplug: Prepare shrink_{zone, pgdat}_span for sub-section removal
On Fri, Apr 26, 2019 at 03:59:12PM +0200, Oscar Salvador wrote:
> On Wed, Apr 17, 2019 at 11:39:16AM -0700, Dan Williams wrote:
> > @@ -417,10 +417,10 @@ static void shrink_zone_span(struct zone *zone, unsigned long start_pfn,
> > * it check the zone has only hole or not.
> > */
> > pfn = zone_start_pfn;
> > - for (; pfn < zone_end_pfn; pfn += PAGES_PER_SECTION) {
> > + for (; pfn < zone_end_pfn; pfn += PAGES_PER_SUB_SECTION) {
> > ms = __pfn_to_section(pfn);
> >
> > - if (unlikely(!valid_section(ms)))
> > + if (unlikely(!pfn_valid(pfn)))
> > continue;
> >
> > if (page_zone(pfn_to_page(pfn)) != zone)
> > @@ -485,10 +485,10 @@ static void shrink_pgdat_span(struct pglist_data *pgdat,
> > * has only hole or not.
> > */
> > pfn = pgdat_start_pfn;
> > - for (; pfn < pgdat_end_pfn; pfn += PAGES_PER_SECTION) {
> > + for (; pfn < pgdat_end_pfn; pfn += PAGES_PER_SUB_SECTION) {
> > ms = __pfn_to_section(pfn);
> >
> > - if (unlikely(!valid_section(ms)))
> > + if (unlikely(!pfn_valid(pfn)))
> > continue;
> >
> > if (pfn_to_nid(pfn) != nid)
>
> The last loop from shrink_{pgdat,zone}_span can be reworked to unify both
> in one function, and both functions can be factored out a bit.
> Actually, I do have a patch that does that, I might dig it up.
>
> The rest looks good:
>
> Reviewed-by: Oscar Salvador <osalvador@suse.de>

I mean of course besides Ralph's comment.

--
Oscar Salvador
SUSE L3

\
 
 \ /
  Last update: 2019-04-26 16:00    [W:0.167 / U:3.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site