summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2013-02-12 13:30:04 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:03:38 -0700
commit81f620153455f246c124fb2d9ef5559e714e3889 (patch)
tree6672364f1d58b33d6604fd0a03fa269e30b57348 /mm/page_alloc.c
parente48a20a27c9c052bd4d13797d4789b674a388cef (diff)
mm: Don't put CMA pages on per cpu lists
CMA allocations rely on being able to migrate pages out quickly to fulfill the allocations. Most use cases for movable allocations meet this requirement. File system allocations may take an unaccpetably long time to migrate, which creates delays from CMA. Prevent CMA pages from ending up on the per-cpu lists to avoid code paths grabbing CMA pages on the fast path. CMA pages can still be allocated as a fallback under tight memory pressure. CRs-Fixed: 452508 Change-Id: I79a28f697275a2a1870caabae53c8ea345b4b47d Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5f948b46451e..896c6c63fe58 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2061,7 +2061,8 @@ void free_hot_cold_page(struct page *page, bool cold)
* excessively into the page allocator
*/
if (migratetype >= MIGRATE_PCPTYPES) {
- if (unlikely(is_migrate_isolate(migratetype))) {
+ if (unlikely(is_migrate_isolate(migratetype)) ||
+ is_migrate_cma(migratetype)) {
free_one_page(zone, page, pfn, 0, migratetype);
goto out;
}