summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-09-24 15:27:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-24 17:00:26 -0700
commitb1aff7fcf86c88472b0a70f15d89d7a4adba07bb (patch)
tree00a1b6194f6abe8a93a1bfb180365800a2873b65 /mm/memcontrol.c
parent694fbc0fe78518d06efa63910bf4ecee660e7852 (diff)
downloadop-kernel-dev-b1aff7fcf86c88472b0a70f15d89d7a4adba07bb.zip
op-kernel-dev-b1aff7fcf86c88472b0a70f15d89d7a4adba07bb.tar.gz
revert "vmscan, memcg: do softlimit reclaim also for targeted reclaim"
Revert commit a5b7c87f9207 ("vmscan, memcg: do softlimit reclaim also for targeted reclaim") 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>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 65e7bec..47cdc7e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1760,13 +1760,11 @@ int mem_cgroup_select_victim_node(struct mem_cgroup *memcg)
#endif
/*
- * A group is eligible for the soft limit reclaim under the given root
- * hierarchy if
- * a) it is over its soft limit
+ * A group is eligible for the soft limit reclaim if
+ * a) it is over its soft limit
* b) any parent up the hierarchy is over its soft limit
*/
-bool mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg,
- struct mem_cgroup *root)
+bool mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg)
{
struct mem_cgroup *parent = memcg;
@@ -1774,14 +1772,12 @@ bool mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg,
return true;
/*
- * If any parent up to the root in the hierarchy is over its soft limit
- * then we have to obey and reclaim from this group as well.
+ * If any parent up the hierarchy is over its soft limit then we
+ * have to obey and reclaim from this group as well.
*/
while ((parent = parent_mem_cgroup(parent))) {
if (res_counter_soft_limit_excess(&parent->res))
return true;
- if (parent == root)
- break;
}
return false;
OpenPOWER on IntegriCloud