Skip to content
Commit afb05dff authored by David Plowman's avatar David Plowman Committed by Phil Elwell
Browse files

mm,page_alloc,cma: introduce a customisable threshold for allocating pages in cma



On some platforms the cma area can be half the entire system memory,
meaning that allocations start happening in the cma area immediately.
This leads to fragmentation and subsequent fatal cma_alloc failures.

We introduce an "alloc_in_cma_threshold" parameter which requires that
this many sixteenths of the free pages must be in cma before it will
try to use them. By default this is set to 12, but the previous
behaviour can be restored by setting it to 8 on startup.

Signed-off-by: default avatarDavid Plowman <david.plowman@raspberrypi.com>
parent a5121809
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment