Skip to contentSkip to conversation

memcg: softlimit reclaim rework

PATCH Superseded Ying Han 4 participants 6 messages Apr 17, 2012 – Apr 23, 2012

Subsystems (5)

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Ying Han

author
#0 lore raw

PATCH v3 1/2 memcg: softlimit reclaim rework

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

Under the global reclaim, we skip reclaiming from a memcg under its softlimit. To prevent reclaim from trying too hard on hitting memcgs (above softlimit) w/ only hard-to-reclaim pages, the reclaim proirity is used to skip the softlimit check. This is a trade-off of system performance and resource isolation.

2. detect no memcgs above softlimit under zone reclaim.

The function zone_reclaimable() marks zone->all_unreclaimable based on per-zone pages_scanned and reclaimable_pages. If all_unreclaimable is true, alloc_pages could go to OOM instead of getting stuck in page reclaim.

In memcg kernel, cgroup under its softlimit is not targeted under global reclaim. It could be possible that all memcgs are under their softlimit for a particular zone. So the direct reclaim do_try_to_free_pages() will always return 1 which causes the caller __alloc_pages_direct_reclaim() enter tight loop.

The reclaim priority check we put in should_reclaim_mem_cgroup() should help this case, but we still don't want to burn cpu cycles for first few priorities to get to that point. The idea is from LSF discussion where we detect it after the first round of scanning and restart the reclaim by not looking at softlimit at all. This allows us to make forward progress on shrink_zone() and free some pages on the zone.

In order to do the detection for scanning all the memcgs under shrink_zone(), i have to change the mem_cgroup_iter() from shared walk to full walk. Otherwise, it would be very easy to skip lots of memcgs above softlimit and it causes the flag "ignore_softlimit" being mistakenly set.

---
 include/linux/memcontrol.h |   18 +--
 include/linux/swap.h       |    4 -
 mm/memcontrol.c            |  397 +-------------------------------------------
 mm/vmscan.c                |  113 +++++--------
 4 files changed, 55 insertions(+), 477 deletions(-)
include/linux/memcontrol.h +7 -11
index f94efd2..b1950af 100644
@@ -111,6 +111,8 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
 				   struct mem_cgroup_reclaim_cookie *);
 void mem_cgroup_iter_break(struct mem_cgroup *, struct mem_cgroup *);
 
+bool mem_cgroup_soft_limit_exceeded(struct mem_cgroup *);
+
 /*
  * For memory reclaim.
  */
@@ -185,9 +187,6 @@ static inline void mem_cgroup_dec_page_stat(struct page *page,
 	mem_cgroup_update_page_stat(page, idx, -1);
 }
 
-unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
-						gfp_t gfp_mask,
-						unsigned long *total_scanned);
 u64 mem_cgroup_get_limit(struct mem_cgroup *memcg);
 
 void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx);
@@ -327,6 +326,11 @@ static inline void mem_cgroup_iter_break(struct mem_cgroup *root,
 {
 }
 
+static inline bool mem_cgroup_soft_limit_exceeded(struct mem_cgroup *mem)
+{
+	return true;
+}
+
 static inline bool mem_cgroup_disabled(void)
 {
 	return true;
@@ -390,14 +394,6 @@ static inline void mem_cgroup_dec_page_stat(struct page *page,
 }
 
 static inline
-unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order,
-					    gfp_t gfp_mask,
-					    unsigned long *total_scanned)
-{
-	return 0;
-}
-
-static inline
 u64 mem_cgroup_get_limit(struct mem_cgroup *memcg)
 {
 	return 0;
include/linux/swap.h +0 -4
index b1fd5c7..c9e9279 100644
@@ -254,10 +254,6 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
 extern int __isolate_lru_page(struct page *page, isolate_mode_t mode, int file);
 extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
 						  gfp_t gfp_mask, bool noswap);
-extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
-						gfp_t gfp_mask, bool noswap,
-						struct zone *zone,
-						unsigned long *nr_scanned);
 extern unsigned long shrink_all_memory(unsigned long nr_pages);
 extern int vm_swappiness;
 extern int remove_mapping(struct address_space *mapping, struct page *page);
mm/memcontrol.c +9 -388

513 lines not on this page · raw message

mm/vmscan.c +39 -74

168 lines not on this page · raw message

Signature · 8 lines
1.7.7.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 7 lines · Ying Han

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Quoted 7 lines

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

I am not sure I understand but I think it does change the semantics. Previously we looked at a group with the biggest excess and reclaim that group _hierarchically_. Now we do not care about hierarchy for soft limit reclaim. Moreover we do kind-of soft reclaim even from hard limit reclaim.

Quoted 37 lines

Under the global reclaim, we skip reclaiming from a memcg under its softlimit. To prevent reclaim from trying too hard on hitting memcgs (above softlimit) w/ only hard-to-reclaim pages, the reclaim proirity is used to skip the softlimit check. This is a trade-off of system performance and resource isolation.

2. detect no memcgs above softlimit under zone reclaim.

The function zone_reclaimable() marks zone->all_unreclaimable based on per-zone pages_scanned and reclaimable_pages. If all_unreclaimable is true, alloc_pages could go to OOM instead of getting stuck in page reclaim.

In memcg kernel, cgroup under its softlimit is not targeted under global reclaim. It could be possible that all memcgs are under their softlimit for a particular zone. So the direct reclaim do_try_to_free_pages() will always return 1 which causes the caller __alloc_pages_direct_reclaim() enter tight loop.

The reclaim priority check we put in should_reclaim_mem_cgroup() should help this case, but we still don't want to burn cpu cycles for first few priorities to get to that point. The idea is from LSF discussion where we detect it after the first round of scanning and restart the reclaim by not looking at softlimit at all. This allows us to make forward progress on shrink_zone() and free some pages on the zone.

In order to do the detection for scanning all the memcgs under shrink_zone(), i have to change the mem_cgroup_iter() from shared walk to full walk. Otherwise, it would be very easy to skip lots of memcgs above softlimit and it causes the flag "ignore_softlimit" being mistakenly set.

---
 include/linux/memcontrol.h |   18 +--
 include/linux/swap.h       |    4 -
 mm/memcontrol.c            |  397 +-------------------------------------------
 mm/vmscan.c                |  113 +++++--------
 4 files changed, 55 insertions(+), 477 deletions(-)

[...]

Quoted 35 lines
mm/vmscan.c +21 -2
index 1a51868..a5f690b 100644
@@ -2128,24 +2128,51 @@ restart:
 	throttle_vm_writeout(sc->gfp_mask);
 }
 
+static bool should_reclaim_mem_cgroup(struct mem_cgroup *target_mem_cgroup,
+				      struct mem_cgroup *memcg,
+				      int priority)
+{
+	/* Reclaim from mem_cgroup if any of these conditions are met:
+	 * - This is a global reclaim
+	 * - reclaim priority is higher than DEF_PRIORITY - 3
+	 * - mem_cgroup exceeds its soft limit
+	 *
+	 * The priority check is a balance of how hard to preserve the pages
+	 * under softlimit. If the memcgs of the zone having trouble to reclaim
+	 * pages above their softlimit, we have to reclaim under softlimit
+	 * instead of burning more cpu cycles.
+	 */
+	if (target_mem_cgroup || priority <= DEF_PRIORITY - 3 ||
+			mem_cgroup_soft_limit_exceeded(memcg))
+		return true;
+
+	return false;
+}
+
 static void shrink_zone(int priority, struct zone *zone,
 			struct scan_control *sc)
 {
 	struct mem_cgroup *root = sc->target_mem_cgroup;
-	struct mem_cgroup_reclaim_cookie reclaim = {
-		.zone = zone,

mm/vmscan.c restart: · line 2162

Quoted 10 lines
mm/vmscan.c +5 -3
-		.priority = priority,
-	};
 	struct mem_cgroup *memcg;
+	int above_softlimit, ignore_softlimit = 0;
+
 
-	memcg = mem_cgroup_iter(root, NULL, &reclaim);
+restart:
+	above_softlimit = 0;
+	memcg = mem_cgroup_iter(root, NULL, NULL);

I am afraid this will not work for hard-limit reclaim. We need the cookie to remember the last memcg we were shrinking from the hierarchy otherwise mem_cgroup_reclaim would hammer on the same group again and again. Consider

	A (hard limit 30M no pages)
	|- B (10M)
	\- C (20M)

then we could easily end up in OOM, right? And the OOM would be for the A group which probably doesn't have any processes in it so we will not make any fwd. process.

Quoted 32 lines
mm/vmscan.c +13 -2
 	do {
 		struct mem_cgroup_zone mz = {
 			.mem_cgroup = memcg,
 			.zone = zone,
 		};
 
-		shrink_mem_cgroup_zone(priority, &mz, sc);
+		if (ignore_softlimit ||
+		   should_reclaim_mem_cgroup(root, memcg, priority)) {
+
+			shrink_mem_cgroup_zone(priority, &mz, sc);
+			above_softlimit = 1;
+		}
+
 		/*
 		 * Limit reclaim has historically picked one memcg and
 		 * scanned it with decreasing priority levels until
@@ -2160,8 +2187,13 @@ static void shrink_zone(int priority, struct zone *zone,
 			mem_cgroup_iter_break(root, memcg);
 			break;
 		}
-		memcg = mem_cgroup_iter(root, memcg, &reclaim);
+		memcg = mem_cgroup_iter(root, memcg, NULL);
 	} while (memcg);
+
+	if (!above_softlimit) {
+		ignore_softlimit = 1;
+		goto restart;
+	}
 }
 
 /* Returns true if compaction should go ahead for a high-order request */

[...]

Signature · 13 lines
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#2 lore raw
Quoted 12 lines · Michal Hocko
Quoted 11 lines · Ying Han

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Quoted 7 lines
Quoted 3 lines

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

I am not sure I understand but I think it does change the semantics. Previously we looked at a group with the biggest excess and reclaim that group _hierarchically_.

yes, we don't do _hierarchically_ reclaim reclaim in this patch. Hmm, that might be what Johannes insists to preserve on the other thread.... ?

Now we do not care about hierarchy for soft

Quoted 2 lines

limit reclaim. Moreover we do kind-of soft reclaim even from hard limit reclaim.

Not yet. This patchset only do soft_limit reclaim under global reclaim. The logic here:

mm/vmscan.c restart: · line 2147

Quoted 3 lines
mm/vmscan.c +3 -0
+     if (target_mem_cgroup || priority <= DEF_PRIORITY - 3 ||
+                     mem_cgroup_soft_limit_exceeded(memcg))
+             return true;

If target_mem_cgroup != NULL, which is the target reclaim, we will always reclaim from the memcg.

Quoted 47 lines
Quoted 38 lines

Under the global reclaim, we skip reclaiming from a memcg under its softlimit. To prevent reclaim from trying too hard on hitting memcgs (above softlimit) w/ only hard-to-reclaim pages, the reclaim proirity is used to skip the softlimit check. This is a trade-off of system performance and resource isolation.

2. detect no memcgs above softlimit under zone reclaim.

The function zone_reclaimable() marks zone->all_unreclaimable based on per-zone pages_scanned and reclaimable_pages. If all_unreclaimable is true, alloc_pages could go to OOM instead of getting stuck in page reclaim.

In memcg kernel, cgroup under its softlimit is not targeted under global reclaim. It could be possible that all memcgs are under their softlimit for a particular zone. So the direct reclaim do_try_to_free_pages() will always return 1 which causes the caller __alloc_pages_direct_reclaim() enter tight loop.

The reclaim priority check we put in should_reclaim_mem_cgroup() should help this case, but we still don't want to burn cpu cycles for first few priorities to get to that point. The idea is from LSF discussion where we detect it after the first round of scanning and restart the reclaim by not looking at softlimit at all. This allows us to make forward progress on shrink_zone() and free some pages on the zone.

In order to do the detection for scanning all the memcgs under shrink_zone(), i have to change the mem_cgroup_iter() from shared walk to full walk. Otherwise, it would be very easy to skip lots of memcgs above softlimit and it causes the flag "ignore_softlimit" being mistakenly set.

---
 include/linux/memcontrol.h |   18 +--
 include/linux/swap.h       |    4 -
 mm/memcontrol.c            |  397 +------------------------------------------- mm/vmscan.c                |  113 +++++--------

 4 files changed, 55 insertions(+), 477 deletions(-)

[...]

Quoted 8 lines
mm/vmscan.c +0 -0
index 1a51868..a5f690b 100644
@@ -2128,24 +2128,51 @@ restart:
       throttle_vm_writeout(sc->gfp_mask);
  }
 
Quoted 6 lines

mm/vmscan.c restart: · line 2136

Quoted 6 lines
mm/vmscan.c +6 -0
+static bool should_reclaim_mem_cgroup(struct mem_cgroup *target_mem_cgroup,
+                                   struct mem_cgroup *memcg,
+                                   int priority)
+{
+     /* Reclaim from mem_cgroup if any of these conditions are met:
+      * - This is a global reclaim

This comment is wrong and confusing... My fault.. It should be "This is a target reclaim".

Quoted 40 lines
Quoted 21 lines
mm/vmscan.c +15 -2
+      * - reclaim priority is higher than DEF_PRIORITY - 3
+      * - mem_cgroup exceeds its soft limit
+      *
+      * The priority check is a balance of how hard to preserve the pages
+      * under softlimit. If the memcgs of the zone having trouble to reclaim
+      * pages above their softlimit, we have to reclaim under softlimit
+      * instead of burning more cpu cycles.
+      */
+     if (target_mem_cgroup || priority <= DEF_PRIORITY - 3 ||
+                     mem_cgroup_soft_limit_exceeded(memcg))
+             return true;
+
+     return false;
+}
+
  static void shrink_zone(int priority, struct zone *zone,
                       struct scan_control *sc)
  {
       struct mem_cgroup *root = sc->target_mem_cgroup;
-     struct mem_cgroup_reclaim_cookie reclaim = {
-             .zone = zone,

mm/vmscan.c restart: · line 2162

Quoted 10 lines
mm/vmscan.c +5 -3
-             .priority = priority,
-     };
       struct mem_cgroup *memcg;
+     int above_softlimit, ignore_softlimit = 0;
+
 
-     memcg = mem_cgroup_iter(root, NULL, &reclaim);
+restart:
+     above_softlimit = 0;
+     memcg = mem_cgroup_iter(root, NULL, NULL);

I am afraid this will not work for hard-limit reclaim. We need the cookie to remember the last memcg we were shrinking from the hierarchy otherwise mem_cgroup_reclaim would hammer on the same group again and again. Consider
       A (hard limit 30M no pages)
       |- B (10M)
       \- C (20M)

Quoted 3 lines

then we could easily end up in OOM, right? And the OOM would be for the A group which probably doesn't have any processes in it so we will not make any fwd. process.

Err... For some reason I missed the mem_cgroup_iter_break() underneath. I have been imagining that we do walk the while hierarchy for hard_limit reclaim as well.

Does it make more sense to walk the hierarchy under A if A hit's limit, instead of keep hitting one memcg w/ all priority levels ?

--Ying

Quoted 32 lines
Quoted 32 lines
mm/vmscan.c +13 -2
       do {
               struct mem_cgroup_zone mz = {
                       .mem_cgroup = memcg,
                       .zone = zone,
               };
 
-             shrink_mem_cgroup_zone(priority, &mz, sc);
+             if (ignore_softlimit ||
+                should_reclaim_mem_cgroup(root, memcg, priority)) {
+
+                     shrink_mem_cgroup_zone(priority, &mz, sc);
+                     above_softlimit = 1;
+             }
+
               /*
                * Limit reclaim has historically picked one memcg and
                * scanned it with decreasing priority levels until
@@ -2160,8 +2187,13 @@ static void shrink_zone(int priority, struct zone *zone,
                       mem_cgroup_iter_break(root, memcg);
                       break;
               }
-             memcg = mem_cgroup_iter(root, memcg, &reclaim);
+             memcg = mem_cgroup_iter(root, memcg, NULL);
       } while (memcg);
+
+     if (!above_softlimit) {
+             ignore_softlimit = 1;
+             goto restart;
+     }
  }
 
Quoted 9 lines

mm/vmscan.c static void shrink_zone(int priority, struct zone *zone, · line 2199

Quoted 1 line
mm/vmscan.c +0 -0
  /* Returns true if compaction should go ahead for a high-order request */

[...]
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

maintainer
#3 lore raw
Quoted 17 lines · Ying Han
Quoted 16 lines · Michal Hocko
Quoted 14 lines · Ying Han

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

Quoted 7 lines
Quoted 3 lines

I am not sure I understand but I think it does change the semantics. Previously we looked at a group with the biggest excess and reclaim that group _hierarchically_.

yes, we don't do _hierarchically_ reclaim reclaim in this patch. Hmm, that might be what Johannes insists to preserve on the other thread.... ?

Yes, that is exactly what I was talking about all along :-)

To reiterate, in the case of

A (soft = 10G)
A1
A2
A3
...

global reclaim should go for A, A1, A2, A3, ... when their sum usage goes above 10G. Regardless of any setting in those subgroups, for reasons I outlined in the other subthread (basically, allowing children to override parental settings assumes you trust all children and their settings to be 'cooperative', which is unprecedented cgroup semantics, afaics, and we can already see this will make problems in the future)

Meanwhile, if you don't want a hierarchical limit, don't set a hierarchical limit. It's possible to organize the tree such that you don't need to, and it should not be an unreasonable amount of work to do so).

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#4 lore raw
Quoted 36 lines · Johannes Weiner
Quoted 17 lines · Ying Han
Quoted 16 lines · Michal Hocko
Quoted 14 lines · Ying Han

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

Quoted 7 lines
Quoted 3 lines

I am not sure I understand but I think it does change the semantics. Previously we looked at a group with the biggest excess and reclaim that group _hierarchically_.

yes, we don't do _hierarchically_ reclaim reclaim in this patch. Hmm, that might be what Johannes insists to preserve on the other thread.... ?

Yes, that is exactly what I was talking about all along :-)

To reiterate, in the case of

A (soft = 10G)
 A1
 A2
 A3
 ...

Quoted 7 lines

global reclaim should go for A, A1, A2, A3, ... when their sum usage goes above 10G.  Regardless of any setting in those subgroups, for reasons I outlined in the other subthread (basically, allowing children to override parental settings assumes you trust all children and their settings to be 'cooperative', which is unprecedented cgroup semantics, afaics, and we can already see this will make problems in the future)

I understand your concern here. Having children to override the parental setting is not what we want, but I think this is a mis-configuration. If admin chose to use soft_limit, we need to lay out the ground rule.

I gave some details on the other thread, maybe we can move the conversation there :)

Quoted 5 lines

Meanwhile, if you don't want a hierarchical limit, don't set a hierarchical limit.  It's possible to organize the tree such that you don't need to, and it should not be an unreasonable amount of work to do so).

Not setting it won't work either way.

1. unlimited: it will never get the pages under A being reclaimed
2. 0: it will get everything being reclaimed under A based on your logic.

Have a nice weekend !

--Ying

Quoted 7 lines

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#5 lore raw
In reply to Johannes Weiner
Quoted 44 lines · Johannes Weiner
Quoted 17 lines · Ying Han
Quoted 16 lines · Michal Hocko
Quoted 14 lines · Ying Han

This patch reverts all the existing softlimit reclaim implementations and instead integrates the softlimit reclaim into existing global reclaim logic.

The new softlimit reclaim includes the following changes:

1. add function should_reclaim_mem_cgroup()

Add the filter function should_reclaim_mem_cgroup() under the common function shrink_zone(). The later one is being called both from per-memcg reclaim as well as global reclaim.

Today the softlimit takes effect only under global memory pressure. The memcgs get free run above their softlimit until there is a global memory contention. This patch doesn't change the semantics.

Quoted 7 lines
Quoted 3 lines

I am not sure I understand but I think it does change the semantics. Previously we looked at a group with the biggest excess and reclaim that group _hierarchically_.

yes, we don't do _hierarchically_ reclaim reclaim in this patch. Hmm, that might be what Johannes insists to preserve on the other thread.... ?

Yes, that is exactly what I was talking about all along :-)

To reiterate, in the case of

A (soft = 10G)
A1
A2
A3
...

global reclaim should go for A, A1, A2, A3, ... when their sum usage goes above 10G. Regardless of any setting in those subgroups, for reasons I outlined in the other subthread (basically, allowing children to override parental settings assumes you trust all children and their settings to be 'cooperative', which is unprecedented cgroup semantics, afaics, and we can already see this will make problems in the future)

Quoted 5 lines

Meanwhile, if you don't want a hierarchical limit, don't set a hierarchical limit. It's possible to organize the tree such that you don't need to, and it should not be an unreasonable amount of work to do so).

I agree.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>