mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mm: make cma the first choice for movable request
cma entertains only movable requests, so it is better to fill up the cma regions first so that MIGRATE_MOVABLE regions remain available to satisfy a steal by unmovable requests, thus improving the chances of unmovable allocation successes during low memory situtations. Change-Id: I01904b86feb5307c17c17072ca9360cf0c17b408 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
2b6a49e9a1
commit
8915754213
@ -2299,14 +2299,14 @@ do_steal:
|
||||
static struct page *__rmqueue(struct zone *zone, unsigned int order,
|
||||
int migratetype)
|
||||
{
|
||||
struct page *page;
|
||||
struct page *page = NULL;
|
||||
|
||||
retry:
|
||||
page = __rmqueue_smallest(zone, order, migratetype);
|
||||
if (unlikely(!page)) {
|
||||
if (migratetype == MIGRATE_MOVABLE)
|
||||
page = __rmqueue_cma_fallback(zone, order);
|
||||
if (migratetype == MIGRATE_MOVABLE)
|
||||
page = __rmqueue_cma_fallback(zone, order);
|
||||
|
||||
if (!page) {
|
||||
page = __rmqueue_smallest(zone, order, migratetype);
|
||||
if (!page && __rmqueue_fallback(zone, order, migratetype))
|
||||
goto retry;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user