Commit 4bf17307 authored by Chris Down's avatar Chris Down Committed by Linus Torvalds

mm, memcg: bypass high reclaim iteration for cgroup hierarchy root

The root of the hierarchy cannot have high set, so we will never reclaim
based on it.  This makes that clearer and avoids another entry.
Signed-off-by: default avatarChris Down <chris@chrisdown.name>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@kernel.org>
Link: http://lkml.kernel.org/r/20200312164137.GA1753625@chrisdown.nameSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7e634208
...@@ -2254,7 +2254,8 @@ static void reclaim_high(struct mem_cgroup *memcg, ...@@ -2254,7 +2254,8 @@ static void reclaim_high(struct mem_cgroup *memcg,
continue; continue;
memcg_memory_event(memcg, MEMCG_HIGH); memcg_memory_event(memcg, MEMCG_HIGH);
try_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, true); try_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, true);
} while ((memcg = parent_mem_cgroup(memcg))); } while ((memcg = parent_mem_cgroup(memcg)) &&
!mem_cgroup_is_root(memcg));
} }
static void high_work_func(struct work_struct *work) static void high_work_func(struct work_struct *work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment