On Tue, Jun 8, 2021 at 10:49 AM Michal Hocko [off-list ref] wrote:
On Tue 08-06-21 10:15:36, Yang Shi wrote:
[...]
quoted
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@suse.com>
Thanks. Will add that into v2.
Thanls!
--
Michal Hocko
SUSE Labs