From 81f620153455f246c124fb2d9ef5559e714e3889 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 12 Feb 2013 13:30:04 -0800 Subject: [PATCH] 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 --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }