[PATCH 2/2] Fix softlimit wrong check of noswap

From: KAMEZAWA Hiroyuki
Date: Wed Jun 08 2011 - 20:54:32 EST


Now, hierarchical reclaim doesn't make swap if memory's limit is
equal to mem+swap limit. Because if reclaim does swap-out,
it still hits mem+swap limit and there will be no progress.
WHEN HITTING HARD LIMIT.

When it comes to softlimit, it works for kswapd. noswap is nonsense.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
---
mm/memcontrol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3baddcb..06825be 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1663,7 +1663,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
excess = res_counter_soft_limit_excess(&root_mem->res) >> PAGE_SHIFT;

/* If memsw_is_minimum==1, swap-out is of-no-use. */
- if (root_mem->memsw_is_minimum)
+ if (!check_soft && root_mem->memsw_is_minimum)
noswap = true;

while (1) {
--
1.7.4.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/