msm: kgsl: Fix to record NR_KERNEL_MISC_RECLAIMABLE in page units

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

Change-Id: I04afe798716f7352e12a51a6c1d9e4a6f8709308
Signed-off-by: Liam Mark <lmark@codeaurora.org>
This commit is contained in:
Liam Mark 2020-03-12 13:20:31 -07:00
commit 0feeb5eba5

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*/
#include <asm/cacheflush.h>
@ -101,7 +101,7 @@ _kgsl_pool_add_page(struct kgsl_page_pool *pool, struct page *p)
pool->page_count++;
spin_unlock(&pool->list_lock);
mod_node_page_state(page_pgdat(p), NR_KERNEL_MISC_RECLAIMABLE,
(PAGE_SIZE << pool->pool_order));
(1 << pool->pool_order));
}
/* Returns a page from specified pool */
@ -118,7 +118,7 @@ _kgsl_pool_get_page(struct kgsl_page_pool *pool)
}
spin_unlock(&pool->list_lock);
mod_node_page_state(page_pgdat(p), NR_KERNEL_MISC_RECLAIMABLE,
-(PAGE_SIZE << pool->pool_order));
-(1 << pool->pool_order));
return p;
}