mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: mm: Avoid merging cma with others
MIGRATE_CMA is incorrectly considered as mergeable since433445e9a1("ANDROID: mm: add cma pcp list"), which moves the MIGRATE_PCPTYPES enum after MIGRATE_CMA. This causes incorrect CMA accounting with CmaFree greater than CmaTotal. CmaTotal: 307200 kB CmaFree: 314100 kB The problem is observed when running the CtsAutoFillServiceTestCases module with mem=2G, cma=300M, swap(zram)=600M. And this issue is caused by the combination of433445e9a1("ANDROID: mm: add cma pcp list") and1dd214b8f2("mm: page_alloc: avoid merging non-fallbackable pageblocks with others") which was introduced in 5.18 kernel. Bug: 282793501 Fixes:433445e9a1("ANDROID: mm: add cma pcp list") Signed-off-by: Haoran.Wang <elven.wang@nxp.com> Signed-off-by: Jindong Yue <jindong.yue@nxp.com> Change-Id: I9bf705984682f29b2a23ba38536e667617b1a8b6
This commit is contained in:
@@ -94,7 +94,7 @@ static inline bool is_migrate_movable(int mt)
|
|||||||
*/
|
*/
|
||||||
static inline bool migratetype_is_mergeable(int mt)
|
static inline bool migratetype_is_mergeable(int mt)
|
||||||
{
|
{
|
||||||
return mt < MIGRATE_PCPTYPES;
|
return mt <= MIGRATE_RECLAIMABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define for_each_migratetype_order(order, type) \
|
#define for_each_migratetype_order(order, type) \
|
||||||
|
|||||||
Reference in New Issue
Block a user