diff options
author | Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> | 2009-01-07 21:08:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:07 -0500 |
commit | 670ec2f170301425fc4fdfa63d40652071fe85f6 (patch) | |
tree | 37a25cfc34c3ddada5bbb428cf1d4842ed30df1f /mm/memcontrol.c | |
parent | a7fe942e94b2f66aa0f11d37699c0ec8155d3ad1 (diff) |
memcg: hierarchy avoid unnecessary reclaim
If hierarchy is not used, no tree-walk is necessary.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.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, 2 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 964a70035e8f..9b4993ee46b3 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -606,6 +606,8 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem, | |||
606 | ret = try_to_free_mem_cgroup_pages(root_mem, gfp_mask, noswap); | 606 | ret = try_to_free_mem_cgroup_pages(root_mem, gfp_mask, noswap); |
607 | if (mem_cgroup_check_under_limit(root_mem)) | 607 | if (mem_cgroup_check_under_limit(root_mem)) |
608 | return 0; | 608 | return 0; |
609 | if (!root_mem->use_hierarchy) | ||
610 | return ret; | ||
609 | 611 | ||
610 | next_mem = mem_cgroup_get_first_node(root_mem); | 612 | next_mem = mem_cgroup_get_first_node(root_mem); |
611 | 613 | ||