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

Commit 9efa4479 authored by Vinayak Menon's avatar Vinayak Menon
Browse files

mm: vmpressure: fix dual calls to global vmpressure



vmpressure function is invoked multiple time from shrink_node,
once for each memcg and then for the entire subtree. But global
vmpressure calculation is performed for each of these calls
resulting in window period ending fast. This is not a problem
when CONFIG_MEMCG is enabled, as global vmpressure is not used
in that case. With !CONFIG_MEMCG global vmpressure is called
twice. Fix this.

Change-Id: I9262790dbe38880e56917b2214c2da59a342ce66
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent cd4a99b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ static void vmpressure_global(gfp_t gfp, unsigned long scanned,
void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
		unsigned long scanned, unsigned long reclaimed)
{
	if (!memcg)
	if (!memcg && tree)
		vmpressure_global(gfp, scanned, reclaimed);

	if (IS_ENABLED(CONFIG_MEMCG))