Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Marek Szyprowski and committed by
Linus Torvalds
41a79734 6e666884

+4
+4
mm/page_alloc.c
··· 773 773 set_pageblock_migratetype(page, MIGRATE_CMA); 774 774 __free_pages(page, pageblock_order); 775 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 781 #endif 778 782