mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
ion: add ion pages to NR_UNRECLAIMABLE_PAGES
add the ion pages allocated through system and system secure heaps to NR_UNRECLAIMABLE_PAGES memory counter. Change-Id: I4bf846fcd0454a5ba0e1cad08e9b7e882f92ceac Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org> [guptap@codeaurora.org: Add Kconfig entry to prevent ABI breakages in GKI] Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
This commit is contained in:
parent
bfe3637f89
commit
ff60d1d2db
1 changed files with 17 additions and 0 deletions
|
|
@ -153,8 +153,19 @@ void free_buffer_page(struct ion_system_heap *heap,
|
|||
ion_page_pool_free_immediate(pool, page);
|
||||
else
|
||||
ion_page_pool_free(pool, page);
|
||||
|
||||
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
|
||||
mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
|
||||
-(1 << pool->order));
|
||||
#endif
|
||||
} else {
|
||||
__free_pages(page, order);
|
||||
|
||||
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
|
||||
mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
|
||||
-(1 << order));
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -314,6 +325,12 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
|
|||
|
||||
sz = (1 << info->order) * PAGE_SIZE;
|
||||
|
||||
#ifdef CONFIG_MM_STAT_UNRECLAIMABLE_PAGES
|
||||
mod_node_page_state(page_pgdat(info->page),
|
||||
NR_UNRECLAIMABLE_PAGES,
|
||||
(1 << (info->order)));
|
||||
#endif
|
||||
|
||||
if (info->from_pool) {
|
||||
list_add_tail(&info->list, &pages_from_pool);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue