memcg: soft limit reclaim should end at limit not below
Soft limit reclaim continues until the usage is below the current soft limit, but the documented semantics are actually that soft limit reclaim will push usage back until the soft limits are met again. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
56039efa18
commit
b7c6167848
@ -1477,7 +1477,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
|
||||
return ret;
|
||||
total += ret;
|
||||
if (check_soft) {
|
||||
if (res_counter_check_under_soft_limit(&root_mem->res))
|
||||
if (res_counter_check_within_soft_limit(&root_mem->res))
|
||||
return total;
|
||||
} else if (mem_cgroup_check_under_limit(root_mem))
|
||||
return 1 + total;
|
||||
|
Reference in New Issue
Block a user