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

Commit b682859d authored by Hareesh Gundu's avatar Hareesh Gundu
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>
parent 0c7a201a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
// 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>
@@ -100,7 +100,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;
}