[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGM2reY-uUTBYUY9XhhQqm6CRWjFsH0fxJ1H7D3+-0Lbyy8HTg@mail.gmail.com>
Date: Fri, 27 Jul 2018 11:24:15 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: osalvador@...hadventures.net
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>, mgorman@...hsingularity.net,
aaron.lu@...el.com, iamjoonsoo.kim@....com,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, dan.j.williams@...el.com,
osalvador@...e.de
Subject: Re: [PATCH v4 4/4] mm/page_alloc: Introduce free_area_init_core_hotplug
Hi Oscar,
> static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
Remove __ref from this function and add it to
free_area_init_core_hotplug() instead, as that is the only function
from a different section. This will reduce the scope of ref, and no
need to place reset_node_managed_pages() into a different section as
it is compiled only when CONFIG_MEMORY_HOTPLUG=y
> +#ifdef CONFIG_MEMORY_HOTPLUG
> +void __paginginit free_area_init_core_hotplug(int nid)
> +{
> + enum zone_type j;
> + pg_data_t *pgdat = NODE_DATA(nid);
> +
> + pgdat_init_internals(pgdat);
> + for (j = 0; j < MAX_NR_ZONES; j++) {
> + struct zone *zone = pgdat->node_zones + j;
> + zone_init_internals(zone, j, nid, 0);
> + }
> +}
Style: I would write the for() loop above like this:
for (i = 0; i < MAX_NR_ZONES; i++)
zone_init_internals(&pgdat->node_zones[i], i, nid, 0);
Other than this all good:
Reviewed-by: Pavel Tatashin <pasha.tatashin@...cle.com>
Thank you,
Pavel
Powered by blists - more mailing lists