mm: cma: on movable allocations try MIGRATE_CMA first
It has been observed that system tends to keep a lot of CMA free pages even in very high memory pressure use cases. The CMA fallback for movable pages is used very rarely, only when system is completely pruned from MOVABLE pages. This means that the out-of-memory is triggered for unmovable allocations even when there are many CMA pages available. This problem was not observed previously since movable pages were used as a fallback for unmovable allocations. To avoid such situation this commit changes the allocation order so that on movable allocations the MIGRATE_CMA pageblocks are used first. This change means that the MIGRATE_CMA can be removed from fallback path of the MIGRATE_MOVABLE type. This means that the __rmqueue_fallback() function will never deal with CMA pages and thus all the checks around MIGRATE_CMA can be removed from that function. (cherry picked from commit b5662d64fa5ee483b985b351dec993402422fee3) Change-Id: Iaadcb2dd5c8fe870271145c8fe2cf1e130631f15 CRs-Fixed: 435287 Signed-off-by:Michal Nazarewicz <mina86@mina86.com> Reported-by:
Marek Szyprowski <m.szyprowski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Laura Abbott <lauraa@codeaurora.org>
Loading
Please sign in to comment