Re: [PATCH] mm/page_alloc: don't corrupt pcppage_migratetype
From: Mel Gorman
Date: Thu Aug 12 2021 - 06:56:13 EST
On Wed, Aug 11, 2021 at 11:29:17AM -0700, Doug Berger wrote:
> When placing pages on a pcp list, migratetype values over
> MIGRATE_PCPTYPES get added to the MIGRATE_MOVABLE pcp list.
>
> However, the actual migratetype is preserved in the page and
> should not be changed to MIGRATE_MOVABLE or the page may end
> up on the wrong free_list.
>
> Fixes: df1acc856923 ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock")
> Signed-off-by: Doug Berger <opendmb@xxxxxxxxx>
Oops, yes. The impact is that HIGHATOMIC or CMA pages getting bulk freed
from the PCP lists could potentially end up on the wrong buddy list.
There are various consequences but minimally NR_FREE_CMA_PAGES accounting
could get screwed up.
Thanks Doug
Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
--
Mel Gorman
SUSE Labs