Re: [PATCH 3/3] mm/page_alloc: Split context in free_area_init_node

2018-07-19 Thread Oscar Salvador
On Wed, Jul 18, 2018 at 10:34:19AM -0400, Pavel Tatashin wrote: > On Wed, Jul 18, 2018 at 8:47 AM wrote: > > > > From: Oscar Salvador > > > > If free_area_init_node gets called from memhotplug code, > > we do not need to call calculate_node_totalpages(), > > as the node has no pages. > > I am no

Re: [PATCH 3/3] mm/page_alloc: Split context in free_area_init_node

2018-07-18 Thread Pavel Tatashin
On Wed, Jul 18, 2018 at 8:47 AM wrote: > > From: Oscar Salvador > > If free_area_init_node gets called from memhotplug code, > we do not need to call calculate_node_totalpages(), > as the node has no pages. I am not positive this is safe. Some pgdat fields in calculate_node_totalpages() are set.

[PATCH 3/3] mm/page_alloc: Split context in free_area_init_node

2018-07-18 Thread osalvador
From: Oscar Salvador If free_area_init_node gets called from memhotplug code, we do not need to call calculate_node_totalpages(), as the node has no pages. The same goes for the deferred initialization, as memmap_init_zone skips that when the context is MEMMAP_HOTPLUG. Signed-off-by: Oscar Salv