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

Commit 43d6288f authored by Liam Mark's avatar Liam Mark
Browse files

ion: Fix to record NR_KERNEL_MISC_RECLAIMABLE in page units



Currently NR_KERNEL_MISC_RECLAIMABLE is being updated with units of bytes.
Fix to correctly update NR_KERNEL_MISC_RECLAIMABLE using page units.

Change-Id: Ie6c620a2a2218be1b30e9f1539c9d0d92870a726
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent 333b4ccb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ static void ion_page_pool_add(struct ion_page_pool *pool, struct page *page)

	atomic_inc(&pool->count);
	mod_node_page_state(page_pgdat(page), NR_KERNEL_MISC_RECLAIMABLE,
			    (1 << (PAGE_SHIFT + pool->order)));
			    (1 << pool->order));
	mutex_unlock(&pool->mutex);
}

@@ -119,7 +119,7 @@ static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high)
	atomic_dec(&pool->count);
	list_del(&page->lru);
	mod_node_page_state(page_pgdat(page), NR_KERNEL_MISC_RECLAIMABLE,
					-(1 << (PAGE_SHIFT + pool->order)));
					-(1 << pool->order));
	return page;
}