[RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page directly to the allocator

From: Wenwei Tao
Date: Sat Jun 18 2016 - 05:37:32 EST


From: Wenwei Tao <ww.tao0320@xxxxxxxxx>

Some pages might have already been allocated before reserve
the pageblock as HIGHATOMIC. When free these pages, put them
directly to the allocator instead of the pcp lists since they
might have the chance to be merged to high order pages.

Signed-off-by: Wenwei Tao <ww.tao0320@xxxxxxxxx>
---
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 6903b69..19f9e76 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2412,7 +2412,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) ||
+ migratetype == MIGRATE_HIGHATOMIC)) {
free_one_page(zone, page, pfn, 0, migratetype);
goto out;
}
--
1.8.3.1