diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2011-03-23 19:42:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 22:46:23 -0400 |
commit | b7c6167848fa36e32f1874b95c1edc02881cd040 (patch) | |
tree | d160acb871f2be4e0e7095c662b647e12a199dac /mm/memcontrol.c | |
parent | 56039efa18f2530fc23e8ef19e716b65ee2a1d1e (diff) |
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>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b56bd74b486f..13de53fe0108 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1477,7 +1477,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem, | |||
1477 | return ret; | 1477 | return ret; |
1478 | total += ret; | 1478 | total += ret; |
1479 | if (check_soft) { | 1479 | if (check_soft) { |
1480 | if (res_counter_check_under_soft_limit(&root_mem->res)) | 1480 | if (res_counter_check_within_soft_limit(&root_mem->res)) |
1481 | return total; | 1481 | return total; |
1482 | } else if (mem_cgroup_check_under_limit(root_mem)) | 1482 | } else if (mem_cgroup_check_under_limit(root_mem)) |
1483 | return 1 + total; | 1483 | return 1 + total; |