On Wed, Jul 18, 2018 at 8:47 AM <osalvador@xxxxxxxxxxxxxxxxxx> wrote: > > From: Oscar Salvador <osalvador@xxxxxxx> > > 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. Even if those fields are always set to zeros, pgdat may be reused (i.e. node went offline and later came back online), so we might still need to set those fields to zeroes. Pavel