Commit 670ec2f1 authored by Daisuke Nishimura's avatar Daisuke Nishimura Committed by Linus Torvalds
Browse files

memcg: hierarchy avoid unnecessary reclaim

If hierarchy is not used, no tree-walk is necessary.
Reviewed-by: default avatarKOSAKI Motohiro <>
Signed-off-by: default avatarDaisuke Nishimura <>
Signed-off-by: default avatarKAMEZAWA Hiroyuki <>
Cc: Balbir Singh <>
Cc: Daisuke Nishimura <>
Cc: Hugh Dickins <>
Cc: KOSAKI Motohiro <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a7fe942e
......@@ -606,6 +606,8 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
ret = try_to_free_mem_cgroup_pages(root_mem, gfp_mask, noswap);
if (mem_cgroup_check_under_limit(root_mem))
return 0;
if (!root_mem->use_hierarchy)
return ret;
next_mem = mem_cgroup_get_first_node(root_mem);
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