From 029dbdfe2a3c8f03ac08bb5d0316643d5a4cb1dc Mon Sep 17 00:00:00 2001 From: Vinayak Menon Date: Tue, 23 Feb 2016 18:06:29 +0530 Subject: mm: add zone counter for cma pages Add per free area nr_free_cma counter. The idea is to also track the number of cma pages present in free pages. This will be used in later patches to fix issues with zone_watermark_ok. Change-Id: I97da9d2f3642db56fc541c48ab56a7ce78e2333c Signed-off-by: Vinayak Menon Signed-off-by: Prakash Gupta (cherry picked from commit a147305588507b1a241af87f1006c5d0b30beade) --- include/linux/mmzone.h | 1 + include/linux/page-isolation.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9ceef771f..c44cd2925 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -102,6 +102,7 @@ static inline int get_pageblock_migratetype(struct page *page) struct free_area { struct list_head free_list[MIGRATE_TYPES]; unsigned long nr_free; + unsigned long nr_free_cma; }; struct pglist_data; diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h index 843187592..6b6ad8a5c 100644 --- a/include/linux/page-isolation.h +++ b/include/linux/page-isolation.h @@ -37,10 +37,10 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, bool skip_hwpoisoned_pages); void set_pageblock_migratetype(struct page *page, int migratetype); int move_freepages_block(struct zone *zone, struct page *page, - int migratetype); + int migratetype, int old_mt); int move_freepages(struct zone *zone, struct page *start_page, struct page *end_page, - int migratetype); + int migratetype, int old_mt); /* * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE. -- cgit v1.2.3