revert "memcg, vmscan: do not attempt soft limit reclaim if it would not scan anything"
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 24 Sep 2013 22:27:35 +0000 (15:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 Sep 2013 00:00:25 +0000 (17:00 -0700)
Revert commit e839b6a1c8d0 ("memcg, vmscan: do not attempt soft limit
reclaim if it would not scan anything")

I merged this prematurely - Michal and Johannes still disagree about the
overall design direction and the future remains unclear.

Cc: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c
mm/vmscan.c

index 5ee0af463f2ecad7d377ba60822f1e096f91601a..5cf7726764cc02f3e4619fb997488d262f087776 100644 (file)
@@ -1872,11 +1872,7 @@ enum mem_cgroup_filter_t
 mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg,
                struct mem_cgroup *root)
 {
-       struct mem_cgroup *parent;
-
-       if (!memcg)
-               memcg = root_mem_cgroup;
-       parent = memcg;
+       struct mem_cgroup *parent = memcg;
 
        if (res_counter_soft_limit_excess(&memcg->res))
                return VISIT;
index 97b0ed16749ff39cfddf76f8b3aa941761de8b48..cdd300b8148564cda113da33d1606af010be37da 100644 (file)
@@ -142,9 +142,7 @@ static bool global_reclaim(struct scan_control *sc)
 
 static bool mem_cgroup_should_soft_reclaim(struct scan_control *sc)
 {
-       struct mem_cgroup *root = sc->target_mem_cgroup;
-       return !mem_cgroup_disabled() &&
-               mem_cgroup_soft_reclaim_eligible(root, root) != SKIP_TREE;
+       return !mem_cgroup_disabled();
 }
 #else
 static bool global_reclaim(struct scan_control *sc)