Commit c5dc859b authored by Sebastian Achim's avatar Sebastian Achim Committed by Oleksiy Avramchenko
Browse files

ANDROID: cma: Add restrict_cma_redirect boot parameter



Commit "mm,page_alloc,cma: conditionally prefer cma pageblocks for
movable allocations" (16867664) introduced balancing of movable
allocations between CMA and normal areas.

Commit "ANDROID: cma: redirect page allocation to CMA" (f60c5572)
removes it, making allocations go in CMA area first.

1. Reintroduce the condition, so that CMA and normal area are used
in a balanced way(as it used to be), so it prevents depleting of CMA
region;

2. Back-port a command line option(from 6.6), "restrict_cma_redirect",
that can be used if only MOVABLE allocations marked as __GFP_CMA are
eligible to be redirected to CMA region. By default it is true.

The purpose of this change is to keep using CMA for movable allocations,
but at the same time, to have enough free CMA pages for critical system
areas such as modem initialization, GPU initialization and so on.

Bug: 397184449
Bug: 381168812
Signed-off-by: default avatarSebastian Achim <sebastian.1.achim@sony.com>
Signed-off-by: default avatarUladzislau Rezki <uladzislau.rezki@sony.com>
Signed-off-by: default avatarOleksiy Avramchenko <oleksiy.avramchenko@sony.com>
Change-Id: I5fd6d022340715e27754c687189c5ea0e56d9ee6
(cherry picked from commit ccc91578)
parent a0b6635b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment