diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2013-02-12 16:46:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-12 17:34:00 -0500 |
commit | 41a7973447b0b8717f0a214d4328dc31ec2291d7 (patch) | |
tree | 5a6f61b306ed429cad999a59852f5b8e993454af /mm/page_alloc.c | |
parent | 6e6668845fe593414a938b7726d6359b5570ac5a (diff) |
mm: cma: fix accounting of CMA pages placed in high memory
The total number of low memory pages is determined as totalram_pages -
totalhigh_pages, so without this patch all CMA pageblocks placed in
highmem were accounted to low memory.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index df2022ff0c8a..9673d96b1ba7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -773,6 +773,10 @@ void __init init_cma_reserved_pageblock(struct page *page) | |||
773 | set_pageblock_migratetype(page, MIGRATE_CMA); | 773 | set_pageblock_migratetype(page, MIGRATE_CMA); |
774 | __free_pages(page, pageblock_order); | 774 | __free_pages(page, pageblock_order); |
775 | totalram_pages += pageblock_nr_pages; | 775 | totalram_pages += pageblock_nr_pages; |
776 | #ifdef CONFIG_HIGHMEM | ||
777 | if (PageHighMem(page)) | ||
778 | totalhigh_pages += pageblock_nr_pages; | ||
779 | #endif | ||
776 | } | 780 | } |
777 | #endif | 781 | #endif |
778 | 782 | ||