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

Commit dad46946 authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Sebanti Das
Browse files

msm: kgsl: Correct page stats when page is pulled out from pool



Currently pages stats NR_INDIRECTLY_RECLAIMABLE_BYTES is
subtracted even though page is not present in the pool. Add
a check to ensure that page stats is subtracted when page is
pulled out from the kgsl pool.

Change-Id: I5823177d7e242db25aeca2da5a9ddf6d1982859b
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: default avatarSebanti Das <sebadas@codeaurora.org>
parent 92fc776b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, 2019 The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2017, 2019-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -106,7 +106,10 @@ _kgsl_pool_get_page(struct kgsl_page_pool *pool)
		list_del(&p->lru);
	}
	spin_unlock(&pool->list_lock);
	mod_node_page_state(page_pgdat(p), NR_INDIRECTLY_RECLAIMABLE_BYTES,

	if (p != NULL)
		mod_node_page_state(page_pgdat(p),
				NR_INDIRECTLY_RECLAIMABLE_BYTES,
				-(PAGE_SIZE << pool->pool_order));
	return p;
}