summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2016-03-24 11:19:20 -0700
committerTim Murray <timmurray@google.com>2016-03-25 16:47:29 +0000
commit8eaa82aa55b3b6d67caabdb3622112d6ac6703e8 (patch)
tree3cef2334da69bc04c0b17814bbb55873fd319f6d
parentc346b19ba866c2531664d1a963604040600ca3fa (diff)
downloadmsm-android-msm-bullhead-3.10-marshmallow-mr2.tar.gz
Some users were still seeing extreme unmovable page block migration over time due to unmovable allocations stealing mostly free movable blocks. Reduce the likelihood of this by only allowing unmovable allocations to aggressively steal reclaimable pageblocks. bug 26916944 Change-Id: I87fe0b0963ea967e4edf1ef60ae3fd297bf6978c
-rw-r--r--mm/page_alloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8f7961d5e01f..9f9f9989e524 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1065,7 +1065,11 @@ static void try_to_steal_freepages(struct zone *zone, struct page *page,
return;
}
- if (current_order >= pageblock_order / 2 ||
+ /* don't let unmovable allocations cause migrations simply because of free pages */
+ if ((start_type != MIGRATE_UNMOVABLE && current_order >= pageblock_order / 2) ||
+ /* only steal reclaimable page blocks for unmovable allocations */
+ (start_type == MIGRATE_UNMOVABLE && fallback_type != MIGRATE_MOVABLE && current_order >= pageblock_order / 2) ||
+ /* reclaimable can steal aggressively */
start_type == MIGRATE_RECLAIMABLE ||
/* allow unmovable allocs up to 64K without migrating blocks */
(start_type == MIGRATE_UNMOVABLE && start_order >= 5) ||