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 Bug: 400858829 Signed-off-by:Sebastian Achim <sebastian.1.achim@sony.com> Signed-off-by:
Uladzislau Rezki <uladzislau.rezki@sony.com> Signed-off-by:
Oleksiy Avramchenko <oleksiy.avramchenko@sony.com> Change-Id: I5fd6d022340715e27754c687189c5ea0e56d9ee6 (cherry picked from commit ccc91578) (cherry picked from commit c5dc859b)
Loading
Please sign in to comment