Commit a0fe7bbc authored by Zi Yan's avatar Zi Yan Committed by Suren Baghdasaryan
Browse files

UPSTREAM: mm: page_alloc: set migratetype inside move_freepages()

This avoids changing migratetype after move_freepages() or
move_freepages_block(), which is error prone.  It also prepares for
upcoming changes to fix move_freepages() not moving free pages partially
in the range.

Link: https://lkml.kernel.org/r/20240320180429.678181-9-hannes@cmpxchg.org


Signed-off-by: default avatarZi Yan <ziy@nvidia.com>
Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
Tested-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

Bug: 406708503
(cherry picked from commit f37c0f68)

Change-Id: I55450b592e001f9840e44027de21fe7bd5b0998f
Signed-off-by: default avataryipeng xiang <yipengxiang@honor.corp-partner.google.com>
parent 7bd0ba08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment