summaryrefslogtreecommitdiff
path: root/fs/lockd/svcshare.c
diff options
context:
space:
mode:
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>2011-07-26 16:08:25 -0700
committerJonas ABERG <jonas.aberg@stericsson.com>2011-10-28 11:15:14 +0200
commit054ec64fd15eee41a24e26ee47dc510fa6078a09 (patch)
treea4c7412eefc02dcacbc89c82bab5ca7a4b678fc8 /fs/lockd/svcshare.c
parent54c2e20a6056224161ff80b97aa75fcfafae262e (diff)
memcg: fix behavior of mem_cgroup_resize_limit()
commit 108b6a78463bb8c7163e4f9779f36ad8bbade334 upstream. Commit 22a668d7c3ef ("memcg: fix behavior under memory.limit equals to memsw.limit") introduced "memsw_is_minimum" flag, which becomes true when mem_limit == memsw_limit. The flag is checked at the beginning of reclaim, and "noswap" is set if the flag is true, because using swap is meaningless in this case. This works well in most cases, but when we try to shrink mem_limit, which is the same as memsw_limit now, we might fail to shrink mem_limit because swap doesn't used. This patch fixes this behavior by: - check MEM_CGROUP_RECLAIM_SHRINK at the begining of reclaim - If it is set, don't set "noswap" flag even if memsw_is_minimum is true. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <bsingharora@gmail.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Ying Han <yinghan@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Id3c0472e16756324736e2d59af83be0aad5ec3af Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35664 Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'fs/lockd/svcshare.c')
0 files changed, 0 insertions, 0 deletions