Re: [PATCH v8 3/7] mm,hugetlb: Drop clearing of flag from prep_new_huge_page

From: Mike Kravetz
Date: Thu Apr 15 2021 - 14:50:39 EST


On 4/15/21 3:35 AM, Oscar Salvador wrote:
> Pages allocated after boot get its private field cleared by means
> of post_alloc_hook().
> Pages allocated during boot, that is directly from the memblock allocator,
> get cleared by paging_init()->..->memmap_init_zone->..->__init_single_page()
> before any memblock allocation.
>
> Based on this ground, let us remove the clearing of the flag from
> prep_new_huge_page() as it is not needed.
>
> Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>

The comment "allocated after boot" made sense to me, but I can see where
Michal's suggestion was coming from (list the allocators that do the
clearing).

Also, listing this as a left over would be a good idea.

Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
--
Mike Kravetz