Skip to content
Commit 7b14f344 authored by David Plowman's avatar David Plowman Committed by Dom Cobley
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 7437d85e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment