Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 422c5709 authored by Vinayak Menon's avatar Vinayak Menon Committed by Swathi Sridhar
Browse files

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: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent f1571343
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2450,14 +2450,14 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype)
static __always_inline 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 (!page) {
		page = __rmqueue_smallest(zone, order, migratetype);
		if (!page && __rmqueue_fallback(zone, order, migratetype))
			goto retry;
	}