Re: [PATCH] mm: mempolicy: don't have to split pmd for huge zero page

From: Michal Hocko
Date: Tue Jun 08 2021 - 13:49:46 EST


On Tue 08-06-21 10:15:36, Yang Shi wrote:
[...]
> I did some archeology, the findings are:
>
> The zero page has PageReserved flag set, it was skipped by the
> explicit PageReserved check in mempolicy.c since commit f4598c8b3678
> ("[PATCH] migration: make sure there is no attempt to migrate reserved
> pages."). The zero page was not used anymore by do_anonymous_page()
> since 2.6.24 by commit 557ed1fa2620 ("remove ZERO_PAGE"), then
> reinstated by commit a13ea5b759645 ("mm: reinstate ZERO_PAGE") and
> this commit added zero page check in vm_normal_page(), so mempolicy
> doesn't depend on PageReserved check to skip zero page anymore since
> then.
>
> So the zero page is skipped by mempolicy.c since 2.6.16.

Thanks a lot! This is really useful. Can you just add it to the
changelog so others do not have to go through the painful archeology.

With that, feel free to add
Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Thanls!
--
Michal Hocko
SUSE Labs