dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Marek Szyprowski 2013-02-12 13:46:24 -08:00 committed by Linus Torvalds
parent 6e6668845f
commit 41a7973447
1 changed files with 4 additions and 0 deletions

View File

@ -773,6 +773,10 @@ void __init init_cma_reserved_pageblock(struct page *page)
set_pageblock_migratetype(page, MIGRATE_CMA);
__free_pages(page, pageblock_order);
totalram_pages += pageblock_nr_pages;
#ifdef CONFIG_HIGHMEM
if (PageHighMem(page))
totalhigh_pages += pageblock_nr_pages;
#endif
}
#endif