Re: [PATCH v2 5/5] mm/page_alloc: Only call pgdat_set_deferred_range when the system boots

From: Michal Hocko
Date: Thu Jul 19 2018 - 09:46:28 EST


On Thu 19-07-18 15:27:40, osalvador@xxxxxxxxxxxxxxxxxx wrote:
> From: Oscar Salvador <osalvador@xxxxxxx>
>
> We should only care about deferred initialization when booting.

Again why is this worth doing?

> Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
> ---
> mm/page_alloc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index d77bc2a7ec2c..5911b64a88ab 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6419,7 +6419,8 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
> zones_size, zholes_size);
>
> alloc_node_mem_map(pgdat);
> - pgdat_set_deferred_range(pgdat);
> + if (system_state == SYSTEM_BOOTING)
> + pgdat_set_deferred_range(pgdat);
>
> free_area_init_core(pgdat);
> }
> --
> 2.13.6
>

--
Michal Hocko
SUSE Labs