diff options
author | Tim Murray <timmurray@google.com> | 2016-03-24 11:19:20 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2016-03-25 09:55:15 -0700 |
commit | a12dd8b7384ba7bb4b65121f313fc18a9ffa53f6 (patch) | |
tree | a1915918989de035c11ddcf6cf1748bc5ee1efcf | |
parent | f052d4de4ca0c738b8bbb840ee3c8b91bec6518c (diff) |
mm: improve migration heuristicandroid-6.0.1_r0.63
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.c | 6 |
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) || |