memcg: remove unused retry signal from reclaim
Johannes Weiner [Thu, 26 May 2011 23:25:35 +0000 (16:25 -0700)]
If the memcg reclaim code detects the target memcg below its limit it
exits and returns a guaranteed non-zero value so that the charge is

Nowadays, the charge side checks the memcg limit itself and does not rely
on this non-zero return value trick.

This patch removes it.  The reclaim code will now always return the true
number of pages it reclaimed on its own.

Signed-off-by: Johannes Weiner <>
Acked-by: Rik van Riel<>
Acked-by: Ying Han<>
Acked-by: KAMEZAWA Hiroyuki <>
Reviewed-by: Michal Hocko <>
Cc: Balbir Singh <>
Cc: KOSAKI Motohiro <>
Cc: Mel Gorman <>
Cc: Daisuke Nishimura <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>


index 1520efd..bcb0a0b 100644 (file)
@@ -1596,7 +1596,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
                        if (!res_counter_soft_limit_excess(&root_mem->res))
                                return total;
                } else if (mem_cgroup_margin(root_mem))
-                       return 1 + total;
+                       return total;
        return total;