Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02fae9c2 authored by Vijayanand Jitta's avatar Vijayanand Jitta Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVijayanand Jitta <vjitta@codeaurora.org>
parent 66db0cfc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -108,8 +108,13 @@ void free_buffer_page(struct ion_system_heap *heap,
			ion_page_pool_free_immediate(pool, page);
		else
			ion_page_pool_free(pool, page);

		mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
				    -(1 << pool->order));
	} else {
		__free_pages(page, order);
		mod_node_page_state(page_pgdat(page), NR_UNRECLAIMABLE_PAGES,
				    -(1 << order));
	}
}

@@ -311,6 +316,10 @@ static int ion_system_heap_allocate(struct ion_heap *heap,

		sz = (1 << info->order) * PAGE_SIZE;

		mod_node_page_state(page_pgdat(info->page),
				    NR_UNRECLAIMABLE_PAGES,
				    (1 << (info->order)));

		if (info->from_pool) {
			list_add_tail(&info->list, &pages_from_pool);
		} else {