[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190426135907.GA30513@linux>
Date: Fri, 26 Apr 2019 15:59:12 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Dan Williams <dan.j.williams@...el.com>
Cc: akpm@...ux-foundation.org, Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Logan Gunthorpe <logang@...tatee.com>, linux-mm@...ck.org,
linux-nvdimm@...ts.01.org, linux-kernel@...r.kernel.org,
david@...hat.com
Subject: Re: [PATCH v6 04/12] mm/hotplug: Prepare shrink_{zone, pgdat}_span
for sub-section removal
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@...e.de>
>
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists