mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
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. Change-Id: I10b78fa6a710828520a487b2fc2419b4f7521a6f CRs-Fixed: 480377 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> Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Git-commit: 41a7973447b0b8717f0a214d4328dc31ec2291d7 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
committed by
Laura Abbott
parent
800f2b20ed
commit
178a68efb0
@@ -785,6 +785,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user