All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] memcg: softlimit (Another one) v3
@ 2009-03-09  7:37 KAMEZAWA Hiroyuki
  2009-03-09  7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:37 UTC (permalink / raw)
  To: linux-mm; +Cc: balbir, nishimura, kosaki.motohiro

Still RFC but maybe much better than v2.
(Reduced CC:s)

This patch implemetns softlimit for memcg.
Totally re-designed from v2.

[1/4] patch for softlimit_in_bytes.
[2/4] patch for softlimit_priority and victim scheduler.
[3/4] hooks to kswapd
[4/4] Documentation

Softlimit works when kswapd() runs and select victim cgroup to be reclaimed.

Details of calculation of parameters are not fixed yet but this version will
not be very bad. This patch uses static-priority-round-robin scheduling.
If you have better idea for implemnting dynamic-priority one, it's welcome.

I consider following usage in this patch.

Assume  softlimit supports priority 0...8 (0 is the lowest, 8 is the highest)
Example)
   /group_A/      softlimit=1G, priority=8
           /01    priority=0
           /02    prinrity=1

kswapd() will reclaim memory from 01->02->group_A if cgroup contains memory
in zone.

Thanks,
-Kame


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
@ 2009-03-09  7:39 ` KAMEZAWA Hiroyuki
  2009-03-09  7:44   ` Balbir Singh
  2009-03-09  7:41 ` [RFC][PATCH 2/4] memcg: softlimit priority and victim scheduler KAMEZAWA Hiroyuki
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:39 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, balbir, nishimura, kosaki.motohiro

From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
softlimit.priority and queue for softlimit is added in the next patch.


Changelog v1->v2:
 - For refactoring, divided a patch into 2 part and this patch just
   involves memory.softlimit interface.
 - Removed governor-detect routine, it was buggy in design.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 60 insertions(+), 2 deletions(-)

Index: develop/mm/memcontrol.c
===================================================================
--- develop.orig/mm/memcontrol.c
+++ develop/mm/memcontrol.c
@@ -175,7 +175,10 @@ struct mem_cgroup {
 	atomic_t	refcnt;
 
 	unsigned int	swappiness;
-
+	/*
+	 * Softlimit Params.
+	 */
+	u64		softlimit;
 	/*
 	 * statistics. This must be placed at the end of memcg.
 	 */
@@ -210,6 +213,8 @@ pcg_default_flags[NR_CHARGE_TYPE] = {
 #define MEMFILE_TYPE(val)	(((val) >> 16) & 0xffff)
 #define MEMFILE_ATTR(val)	((val) & 0xffff)
 
+#define _MEM_SOFTLIMIT		(0x10)
+
 static void mem_cgroup_get(struct mem_cgroup *mem);
 static void mem_cgroup_put(struct mem_cgroup *mem);
 static struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *mem);
@@ -1900,6 +1905,39 @@ int mem_cgroup_force_empty_write(struct 
 	return mem_cgroup_force_empty(mem_cgroup_from_cont(cont), true);
 }
 
+/*
+ * Softlimit Handling.
+ */
+
+/*
+ * A group under hierarchy has to check all ancestors.
+ * css's refcnt of "mem" should be in caller.
+ */
+static bool mem_cgroup_hit_softlimit(struct mem_cgroup *mem, void *data)
+{
+	struct mem_cgroup *tmp = mem;
+	struct cgroup *cg;
+	u64 usage;
+
+	do {
+		usage = res_counter_read_u64(&tmp->res, RES_USAGE);
+		if (tmp->res.usage > tmp->softlimit)
+			return true;
+		cg = tmp->css.cgroup;
+		if (!cg->parent)
+			break;
+		tmp = mem_cgroup_from_cont(cg);
+	} while (!tmp->use_hierarchy);
+
+	return false;
+}
+
+static int mem_cgroup_resize_softlimit(struct mem_cgroup *mem, u64 val)
+{
+	mem->softlimit = val;
+	return 0;
+}
+
 
 static u64 mem_cgroup_hierarchy_read(struct cgroup *cont, struct cftype *cft)
 {
@@ -1949,7 +1987,14 @@ static u64 mem_cgroup_read(struct cgroup
 	name = MEMFILE_ATTR(cft->private);
 	switch (type) {
 	case _MEM:
-		val = res_counter_read_u64(&mem->res, name);
+		switch (name) {
+		case _MEM_SOFTLIMIT:
+			val = mem->softlimit;
+			break;
+		default:
+			val = res_counter_read_u64(&mem->res, name);
+			break;
+		}
 		break;
 	case _MEMSWAP:
 		if (do_swap_account)
@@ -1986,6 +2031,12 @@ static int mem_cgroup_write(struct cgrou
 		else
 			ret = mem_cgroup_resize_memsw_limit(memcg, val);
 		break;
+	case _MEM_SOFTLIMIT:
+		ret = res_counter_memparse_write_strategy(buffer, &val);
+		if (ret)
+			break;
+		ret = mem_cgroup_resize_softlimit(memcg, val);
+		break;
 	default:
 		ret = -EINVAL; /* should be BUG() ? */
 		break;
@@ -2235,6 +2286,12 @@ static struct cftype mem_cgroup_files[] 
 		.read_u64 = mem_cgroup_read,
 	},
 	{
+		.name = "softlimit_in_bytes",
+		.private = MEMFILE_PRIVATE(_MEM, _MEM_SOFTLIMIT),
+		.write_string = mem_cgroup_write,
+		.read_u64 = mem_cgroup_read,
+	},
+	{
 		.name = "failcnt",
 		.private = MEMFILE_PRIVATE(_MEM, RES_FAILCNT),
 		.trigger = mem_cgroup_reset,
@@ -2460,6 +2517,7 @@ mem_cgroup_create(struct cgroup_subsys *
 	}
 	mem->last_scanned_child = 0;
 	spin_lock_init(&mem->reclaim_param_lock);
+	mem->softlimit = ULLONG_MAX;
 
 	if (parent)
 		mem->swappiness = get_swappiness(parent);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC][PATCH 2/4] memcg: softlimit priority and victim scheduler
  2009-03-09  7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
  2009-03-09  7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
@ 2009-03-09  7:41 ` KAMEZAWA Hiroyuki
  2009-03-09  7:42 ` [RFC][PATCH 3/4] memcg: softlimit caller via kswapd KAMEZAWA Hiroyuki
  2009-03-09  7:43 ` [RFC][PATCH 4/4] memcg: softlimit documenation KAMEZAWA Hiroyuki
  3 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:41 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, balbir, nishimura, kosaki.motohiro

From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Per-zone queue/scheduler for memory cgroup softlimit.

At handling softlimit, we have to check following 2 points.
  (A) usage on memcg is bigger than softlimit or not.
  (B) memcg has evictable memory on specified zone.

One of design choice is how to call softlimit code. This patch uses
uses kswapd() as a thread for reclaiming memory.
I think this is reasonable. kswapd() is spawned per node.
(The caller itself will be in the next patch.)

Another design choice is "When there are multiple cgroups over softlimit,
which one should be selected."
I added "softlimit_priority" to handle this and implemented static priority
round-robin logic.

>From above, this uses following design.

  1. per-zone schedule queue with priority
  2. scheduling(selection) algorithm is Static Priority Round Robin.
  3. Fortunately, memcg has mem_cgroup_per_zone objects already, Use it
     as scheduling unit.

Initially, memcg has softlimit_priority=SOFTLIMIT_MAXPRIO and it's not queued.
When it is set to some number, it will be added to softlimit queue per zone.

Kswapd() will select the memcg from the top of per-zone queue and check it
satisfies above (A) and (B). If satisfies, memory will be reclaimed from 
selected one and pushed back to tail of CHECK queue. If doesn't, it will be
moved to IGNORE queue.

When kswapd() enters next turn of scanning, IGNORE queue will be merged back
to CHECK queue. (What "next turn" means is another point for discussion..)

(Consideration)
 I wonder we have a chance to implement dynamic-priority scheduling rather than
 static-priority, later. So, priority rage 0-8 is too small ?
 (If no concerns, I'll not increase the range.)

TODO:
 - This patch is more complicated than expected..should be divided...

Changelog: v1->v2
 - totally re-designed.
 - Now, 0 is the lowest, 8 is the highest priority.
 - per-zone queue.
 - Allow kswapd() to pass parameter to requeue this or not.
 - fixed bugs.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 include/linux/memcontrol.h |   19 ++
 mm/memcontrol.c            |  324 ++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 342 insertions(+), 1 deletion(-)

Index: develop/mm/memcontrol.c
===================================================================
--- develop.orig/mm/memcontrol.c
+++ develop/mm/memcontrol.c
@@ -116,6 +116,11 @@ struct mem_cgroup_per_zone {
 	unsigned long		count[NR_LRU_LISTS];
 
 	struct zone_reclaim_stat reclaim_stat;
+	/* For softlimit per-zone queue. See softlimit handling code. */
+	struct mem_cgroup *mem;
+	struct list_head sl_queue;
+	int              sl_state;
+	long             sl_prev_usage;
 };
 /* Macro for accessing counter */
 #define MEM_CGROUP_ZSTAT(mz, idx)	((mz)->count[(idx)])
@@ -179,6 +184,7 @@ struct mem_cgroup {
 	 * Softlimit Params.
 	 */
 	u64		softlimit;
+	int             softlimit_priority;
 	/*
 	 * statistics. This must be placed at the end of memcg.
 	 */
@@ -214,6 +220,7 @@ pcg_default_flags[NR_CHARGE_TYPE] = {
 #define MEMFILE_ATTR(val)	((val) & 0xffff)
 
 #define _MEM_SOFTLIMIT		(0x10)
+#define _MEM_SOFTLIMIT_PRIO	(0x11)
 
 static void mem_cgroup_get(struct mem_cgroup *mem);
 static void mem_cgroup_put(struct mem_cgroup *mem);
@@ -1908,12 +1915,131 @@ int mem_cgroup_force_empty_write(struct 
 /*
  * Softlimit Handling.
  */
+/*
+ * Priority of softlimit is a scheduling parameter for kswapd(). 0...is the
+ * lowest priority and 8 is the highest. This value is inherited at create()
+ * if hierarchical accounting is used (use_hierarchy==1). If not, prio is
+ * set to MAXPRIO and it will be ignored.
+ */
+#define SOFTLIMIT_MAXPRIO (8)
+#define SOFTLIMIT_DEFPRIO (0)
+
+/* Name of queue in softlimit_queue_zone */
+enum {
+	SLQ_CHECK,     /* schedulig target queue */
+	SLQ_IGNORE,   /* ignored queue until next reschedule */
+	SLQ_NUM
+};
+/*
+ * Per-zone softlimit queue. mem_cgroup_per_zone struct will be queued.
+ */
+struct softlimit_queue_zone {
+	spinlock_t lock;
+	struct list_head queue[SLQ_NUM][SOFTLIMIT_MAXPRIO];
+};
+
+struct softlimit_queue_node {
+	struct softlimit_queue_zone zone[MAX_NR_ZONES];
+};
+
+struct softlimit_queue_node *softlimit_sched[MAX_NUMNODES];
 
 /*
+ * Write-Locked at setting priority by user-land and new group creation.
+ * (for keeping sanity of hierarchy) in other case, read-locked
+ */
+DECLARE_RWSEM(softlimit_sem);
+
+/* For mz->sl_state */
+enum {
+	MZ_NOT_ON_QUEUE,
+	MZ_ON_QUEUE,
+	MZ_SELECTED,
+};
+
+/*
+ * Returns queue for zone.
+ */
+static inline struct softlimit_queue_zone *softlimit_queue(int nid, int zid)
+{
+	if (softlimit_sched[nid] == NULL)
+		return NULL;
+	return &softlimit_sched[nid]->zone[zid];
+}
+
+/*
+ * Returns # of evictable memory. (i.e, don't include ANON on swap-less system)
+ */
+static long mz_evictable_usage(struct mem_cgroup_per_zone *mz)
+{
+	long usage = 0;
+
+	/* Not necessary to be very precise. We don't take lock here */
+	if (nr_swap_pages) {
+		usage += MEM_CGROUP_ZSTAT(mz, LRU_ACTIVE_ANON);
+		usage += MEM_CGROUP_ZSTAT(mz, LRU_INACTIVE_ANON);
+	}
+	usage += MEM_CGROUP_ZSTAT(mz, LRU_ACTIVE_FILE);
+	usage += MEM_CGROUP_ZSTAT(mz, LRU_INACTIVE_FILE);
+	return usage;
+}
+
+/* Now, use static-priority */
+static int mz_softlimit_priority(struct mem_cgroup *mem,
+				struct mem_cgroup_per_zone *mz)
+{
+	return mem->softlimit_priority;
+}
+
+static void memcg_softlimit_dequeue(struct mem_cgroup *mem, int nid, int zid)
+{
+	struct softlimit_queue_zone *sqz = softlimit_queue(nid, zid);
+	struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(mem, nid, zid);
+
+	spin_lock(&sqz->lock);
+	list_del_init(&mz->sl_queue);
+	mz->sl_state = MZ_NOT_ON_QUEUE;
+	spin_unlock(&sqz->lock);
+}
+
+static void
+memcg_softlimit_enqueue(struct mem_cgroup *mem, int nid, int zid, bool check)
+{
+	struct softlimit_queue_zone *sqz = softlimit_queue(nid, zid);
+	struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(mem, nid, zid);
+	int queue = SLQ_CHECK;
+	int prio;
+
+	if (mem->softlimit_priority == SOFTLIMIT_MAXPRIO)
+		return;
+	if (!check)
+		queue = SLQ_IGNORE;
+	spin_lock(&sqz->lock);
+	prio = mz_softlimit_priority(mem, mz);
+	if (mz->sl_state != MZ_ON_QUEUE) {
+		list_add_tail(&mz->sl_queue, &sqz->queue[queue][prio]);
+		mz->sl_state = MZ_ON_QUEUE;
+	}
+	spin_unlock(&sqz->lock);
+}
+
+/* merge inactive queue to the tail of check queue */
+static void memcg_softlimit_rotate(int nid, int zid)
+{
+	struct softlimit_queue_zone *sqz = softlimit_queue(nid, zid);
+	int i;
+
+	spin_lock(&sqz->lock);
+	for (i = 0; i < SOFTLIMIT_MAXPRIO; i++)
+		list_splice_tail_init(&sqz->queue[SLQ_IGNORE][i],
+				      &sqz->queue[SLQ_CHECK][i]);
+	spin_unlock(&sqz->lock);
+}
+/*
  * A group under hierarchy has to check all ancestors.
  * css's refcnt of "mem" should be in caller.
  */
-static bool mem_cgroup_hit_softlimit(struct mem_cgroup *mem, void *data)
+static bool mem_cgroup_hit_softlimit(struct mem_cgroup *mem)
 {
 	struct mem_cgroup *tmp = mem;
 	struct cgroup *cg;
@@ -1932,12 +2058,174 @@ static bool mem_cgroup_hit_softlimit(str
 	return false;
 }
 
+static int __mem_cgroup_resize_softlimit(struct mem_cgroup *mem, void *data)
+{
+	int nid;
+	int zid;
+
+	/* softlimit_priority will not change under us. */
+	if (mem->softlimit_priority >= SOFTLIMIT_MAXPRIO)
+		goto out;
+	/* Add mz to queue if never enqueued */
+	for_each_node_state(nid, N_POSSIBLE) {
+		for (zid = 0; zid < MAX_NR_ZONES; zid++) {
+			struct mem_cgroup_per_zone *mz;
+			/*
+			 * We are under semaphore and this check before
+			 * taking lock is safe
+			 */
+			mz = mem_cgroup_zoneinfo(mem, nid, zid);
+			if (mz->sl_state == MZ_NOT_ON_QUEUE)
+				memcg_softlimit_enqueue(mem, nid, zid, true);
+		}
+	}
+out:
+	return 0;
+}
+
 static int mem_cgroup_resize_softlimit(struct mem_cgroup *mem, u64 val)
 {
+
+	down_read(&softlimit_sem);
 	mem->softlimit = val;
+	mem_cgroup_walk_tree(mem, NULL, __mem_cgroup_resize_softlimit);
+	up_read(&softlimit_sem);
 	return 0;
 }
 
+static int mem_cgroup_set_softlimit_priority(struct mem_cgroup *mem, int prio)
+{
+	int nid, zid;
+
+	down_write(&softlimit_sem);
+	if (mem->softlimit_priority < SOFTLIMIT_MAXPRIO) {
+		for_each_node_state(nid, N_POSSIBLE)
+			for (zid = 0; zid < MAX_NR_ZONES; zid++)
+				memcg_softlimit_dequeue(mem, nid, zid);
+	}
+	mem->softlimit_priority = prio;
+	if (mem->softlimit_priority < SOFTLIMIT_MAXPRIO) {
+		for_each_node_state(nid, N_POSSIBLE)
+			for (zid = 0; zid < MAX_NR_ZONES; zid++)
+				memcg_softlimit_enqueue(mem, nid, zid, true);
+	}
+
+	up_write(&softlimit_sem);
+	return 0;
+}
+
+/*
+ * Called by kswapd() and returns victim group to be reclaimed. Used algorithm
+ * is Static-Priority Round Robin against cgroups which hits softlimit.
+ * If cgroup is found to be not candidate, it will be linked to INACTIVE queue.
+ */
+struct mem_cgroup *mem_cgroup_schedule(int nid, int zid)
+{
+	struct mem_cgroup *ret = NULL;
+	struct mem_cgroup_per_zone *mz;
+	struct softlimit_queue_zone *sqz = softlimit_queue(nid, zid);
+	long usage;
+	int prio;
+
+	/* avoid balance_pgdat() starvation */
+	if (!down_read_trylock(&softlimit_sem))
+		return NULL;
+	spin_lock(&sqz->lock);
+	for (prio = 0; !ret && (prio < SOFTLIMIT_MAXPRIO); prio++) {
+		while (!list_empty(&sqz->queue[SLQ_CHECK][prio])) {
+			/* Pick up the first entry */
+			mz = list_first_entry(&sqz->queue[SLQ_CHECK][prio],
+					      struct mem_cgroup_per_zone,
+					      sl_queue);
+			list_del_init(&mz->sl_queue);
+			/*
+			 * For avoiding alloc() v.s. free() war, usage below
+			 * threshold is ignored.
+			 */
+			usage = mz_evictable_usage(mz);
+			if (usage) {
+				struct mem_cgroup *mem = mz->mem;
+				if (mem_cgroup_hit_softlimit(mem) &&
+				    css_tryget(&mem->css)) {
+					mz->sl_state = MZ_SELECTED;
+					mz->sl_prev_usage = usage;
+					ret = mem;
+					break;
+				}
+			}
+			/* move to INACTIVE queue */
+			list_add_tail(&mz->sl_queue,
+				      &sqz->queue[SLQ_IGNORE][prio]);
+		}
+	}
+	spin_unlock(&sqz->lock);
+	up_read(&softlimit_sem);
+
+	return ret;
+}
+
+void mem_cgroup_schedule_end(int nid, int zid, struct mem_cgroup *mem,
+			     bool requeue)
+{
+	struct mem_cgroup_per_zone *mz;
+	long usage;
+
+	if (!mem)
+		return;
+	/* mem->softlimit_priority will not change under this */
+	down_read(&softlimit_sem);
+	mz = mem_cgroup_zoneinfo(mem, nid, zid);
+	usage = mz_evictable_usage(mz);
+	/* Worth to be requeued ? */
+	if (requeue && (usage > SWAP_CLUSTER_MAX))
+		/* Move back to the ACTIVE queue of priority */
+		memcg_softlimit_enqueue(mem, nid, zid, true);
+	else /* Not enough page or Recaliming was not good. */
+		memcg_softlimit_enqueue(mem, nid, zid, false);
+	up_read(&softlimit_sem);
+	/* put refcnt from mem_cgroup_schedule() */
+	css_put(&mem->css);
+}
+
+/* Called by kswapd() once per calling balance_pgdat() */
+void mem_cgroup_reschedule(int nid)
+{
+	int zid;
+
+	/* mem->softlimit_priority will not change under this */
+	down_read(&softlimit_sem);
+	for (zid = 0; zid < MAX_NR_ZONES; zid++)
+		memcg_softlimit_rotate(nid, zid);
+	up_read(&softlimit_sem);
+}
+
+/* Called at first call to mem_cgroup_create() */
+static void __init softlimit_init(void)
+{
+	int zid, i, node, tmp;
+
+	for_each_node_state(node, N_POSSIBLE) {
+		struct softlimit_queue_node *sqn;
+
+		tmp = node;
+		if (!node_state(node, N_NORMAL_MEMORY))
+			tmp = -1;
+		sqn = kmalloc_node(sizeof(*sqn), GFP_KERNEL, tmp);
+		BUG_ON(!sqn);
+
+		for (zid = 0; zid < MAX_NR_ZONES; zid++) {
+			struct softlimit_queue_zone *sqz = &sqn->zone[zid];
+
+			spin_lock_init(&sqz->lock);
+			for (i = 0; i < SOFTLIMIT_MAXPRIO; i++) {
+				INIT_LIST_HEAD(&sqz->queue[SLQ_CHECK][i]);
+				INIT_LIST_HEAD(&sqz->queue[SLQ_IGNORE][i]);
+			}
+		}
+		softlimit_sched[node] = sqn;
+	}
+}
+
 
 static u64 mem_cgroup_hierarchy_read(struct cgroup *cont, struct cftype *cft)
 {
@@ -1977,6 +2265,16 @@ static int mem_cgroup_hierarchy_write(st
 	return retval;
 }
 
+static int mem_cgroup_softlimit_priority_write(struct cgroup *cgrp,
+					       struct cftype *cft,
+					       u64 val)
+{
+	struct mem_cgroup *mem = mem_cgroup_from_cont(cgrp);
+	if (val > SOFTLIMIT_MAXPRIO)
+		return -EINVAL;
+	return mem_cgroup_set_softlimit_priority(mem, val);
+}
+
 static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
 {
 	struct mem_cgroup *mem = mem_cgroup_from_cont(cont);
@@ -1991,6 +2289,9 @@ static u64 mem_cgroup_read(struct cgroup
 		case _MEM_SOFTLIMIT:
 			val = mem->softlimit;
 			break;
+		case _MEM_SOFTLIMIT_PRIO:
+			val = mem->softlimit_priority;
+			break;
 		default:
 			val = res_counter_read_u64(&mem->res, name);
 			break;
@@ -2292,6 +2593,12 @@ static struct cftype mem_cgroup_files[] 
 		.read_u64 = mem_cgroup_read,
 	},
 	{
+		.name = "softlimit_priority",
+		.private = MEMFILE_PRIVATE(_MEM, _MEM_SOFTLIMIT_PRIO),
+		.write_u64 = mem_cgroup_softlimit_priority_write,
+		.read_u64 = mem_cgroup_read,
+	},
+	{
 		.name = "failcnt",
 		.private = MEMFILE_PRIVATE(_MEM, RES_FAILCNT),
 		.trigger = mem_cgroup_reset,
@@ -2385,12 +2692,19 @@ static int alloc_mem_cgroup_per_zone_inf
 		mz = &pn->zoneinfo[zone];
 		for_each_lru(l)
 			INIT_LIST_HEAD(&mz->lists[l]);
+		mz->mem = mem;
+		INIT_LIST_HEAD(&mz->sl_queue);
+		mz->sl_state = MZ_NOT_ON_QUEUE;
 	}
 	return 0;
 }
 
 static void free_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
 {
+	int zid;
+	for (zid = 0; zid < MAX_NR_ZONES; zid++)
+		memcg_softlimit_dequeue(mem, node, zid);
+
 	kfree(mem->info.nodeinfo[node]);
 }
 
@@ -2495,12 +2809,14 @@ mem_cgroup_create(struct cgroup_subsys *
 	/* root ? */
 	if (cont->parent == NULL) {
 		enable_swap_cgroup();
+		softlimit_init();
 		parent = NULL;
 	} else {
 		parent = mem_cgroup_from_cont(cont->parent);
 		mem->use_hierarchy = parent->use_hierarchy;
 	}
 
+	down_write(&softlimit_sem);
 	if (parent && parent->use_hierarchy) {
 		res_counter_init(&mem->res, &parent->res);
 		res_counter_init(&mem->memsw, &parent->memsw);
@@ -2511,9 +2827,11 @@ mem_cgroup_create(struct cgroup_subsys *
 		 * mem_cgroup(see mem_cgroup_put).
 		 */
 		mem_cgroup_get(parent);
+		mem->softlimit_priority = parent->softlimit_priority;
 	} else {
 		res_counter_init(&mem->res, NULL);
 		res_counter_init(&mem->memsw, NULL);
+		mem->softlimit_priority = SOFTLIMIT_MAXPRIO;
 	}
 	mem->last_scanned_child = 0;
 	spin_lock_init(&mem->reclaim_param_lock);
@@ -2521,6 +2839,10 @@ mem_cgroup_create(struct cgroup_subsys *
 
 	if (parent)
 		mem->swappiness = get_swappiness(parent);
+
+	/* add to softlimit queue if necessary */
+	__mem_cgroup_resize_softlimit(mem, NULL);
+	up_write(&softlimit_sem);
 	atomic_set(&mem->refcnt, 1);
 	return &mem->css;
 free_out:
Index: develop/include/linux/memcontrol.h
===================================================================
--- develop.orig/include/linux/memcontrol.h
+++ develop/include/linux/memcontrol.h
@@ -117,6 +117,12 @@ static inline bool mem_cgroup_disabled(v
 
 extern bool mem_cgroup_oom_called(struct task_struct *task);
 
+/* For Softlimit Handler */
+extern struct mem_cgroup *mem_cgroup_schedule(int nid, int zid);
+extern void
+mem_cgroup_schedule_end(int nid, int zid, struct mem_cgroup *mem, bool requeue);
+extern void mem_cgroup_reschedule(int nid);
+
 #else /* CONFIG_CGROUP_MEM_RES_CTLR */
 struct mem_cgroup;
 
@@ -264,6 +270,19 @@ mem_cgroup_print_oom_info(struct mem_cgr
 {
 }
 
+/* For Softlimit Handler */
+static inline struct mem_cgroup *mem_cgroup_schedule(int nid, int zid)
+{
+	return NULL;
+}
+static inline void
+mem_cgroup_schedule_end(int nid, int zid, struct mem_cgroup *mem, bool requeue)
+{
+}
+static inline void mem_cgroup_reschedule(int nid)
+{
+}
+
 #endif /* CONFIG_CGROUP_MEM_CONT */
 
 #endif /* _LINUX_MEMCONTROL_H */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC][PATCH 3/4] memcg: softlimit caller via kswapd
  2009-03-09  7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
  2009-03-09  7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
  2009-03-09  7:41 ` [RFC][PATCH 2/4] memcg: softlimit priority and victim scheduler KAMEZAWA Hiroyuki
@ 2009-03-09  7:42 ` KAMEZAWA Hiroyuki
  2009-03-10 19:02   ` Balbir Singh
  2009-03-09  7:43 ` [RFC][PATCH 4/4] memcg: softlimit documenation KAMEZAWA Hiroyuki
  3 siblings, 1 reply; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:42 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, balbir, nishimura, kosaki.motohiro

From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

This patch adds hooks for memcg's softlimit to kswapd().

Softlimit handler is called...
  - before generic shrink_zone() is called.
  - # of pages to be scanned depends on priority.
  - If not enough progress, selected memcg will be moved to UNUSED queue.
  - at each call for balance_pgdat(), softlimit queue is rebalanced.

Changelog: v1->v2
  - check "enough progress" or not.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 mm/vmscan.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Index: develop/mm/vmscan.c
===================================================================
--- develop.orig/mm/vmscan.c
+++ develop/mm/vmscan.c
@@ -1733,6 +1733,43 @@ unsigned long try_to_free_mem_cgroup_pag
 }
 #endif
 
+static void shrink_zone_softlimit(struct scan_control *sc, struct zone *zone,
+			   int order, int priority, int target, int end_zone)
+{
+	int scan = SWAP_CLUSTER_MAX;
+	int nid = zone->zone_pgdat->node_id;
+	int zid = zone_idx(zone);
+	int before;
+	struct mem_cgroup *mem;
+
+	scan <<= (DEF_PRIORITY - priority);
+	if (scan > (target * 2))
+		scan = target * 2;
+
+	while (scan > 0) {
+		if (zone_watermark_ok(zone, order, target, end_zone, 0))
+			break;
+		mem = mem_cgroup_schedule(nid, zid);
+		if (!mem)
+			return;
+		sc->nr_scanned = 0;
+		sc->mem_cgroup = mem;
+		before = sc->nr_reclaimed;
+		sc->isolate_pages = mem_cgroup_isolate_pages;
+
+		shrink_zone(priority, zone, sc);
+
+		if (sc->nr_reclaimed - before > scan/2)
+			mem_cgroup_schedule_end(nid, zid, mem, true);
+		else
+			mem_cgroup_schedule_end(nid, zid, mem, false);
+
+		sc->mem_cgroup = NULL;
+		sc->isolate_pages = isolate_pages_global;
+		scan -= sc->nr_scanned;
+	}
+	return;
+}
 /*
  * For kswapd, balance_pgdat() will work across all this node's zones until
  * they are all at pages_high.
@@ -1776,6 +1813,8 @@ static unsigned long balance_pgdat(pg_da
 	 */
 	int temp_priority[MAX_NR_ZONES];
 
+	/* Refill softlimit queue */
+	mem_cgroup_reschedule(pgdat->node_id);
 loop_again:
 	total_scanned = 0;
 	sc.nr_reclaimed = 0;
@@ -1856,6 +1895,9 @@ loop_again:
 					       end_zone, 0))
 				all_zones_ok = 0;
 			temp_priority[i] = priority;
+			/* Try soft limit at first */
+			shrink_zone_softlimit(&sc, zone, order, priority,
+					       8 * zone->pages_high, end_zone);
 			sc.nr_scanned = 0;
 			note_zone_scanning_priority(zone, priority);
 			/*

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [RFC][PATCH 4/4] memcg: softlimit documenation
  2009-03-09  7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
                   ` (2 preceding siblings ...)
  2009-03-09  7:42 ` [RFC][PATCH 3/4] memcg: softlimit caller via kswapd KAMEZAWA Hiroyuki
@ 2009-03-09  7:43 ` KAMEZAWA Hiroyuki
  3 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:43 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, balbir, nishimura, kosaki.motohiro

From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Documentation for softlimit

Changelog: (v1)->(v2)
 - fixed typos.
 - added more precise text.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
 Documentation/cgroups/memory.txt |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Index: develop/Documentation/cgroups/memory.txt
===================================================================
--- develop.orig/Documentation/cgroups/memory.txt
+++ develop/Documentation/cgroups/memory.txt
@@ -322,6 +322,35 @@ will be charged as a new owner of it.
   - a cgroup which uses hierarchy and it has child cgroup.
   - a cgroup which uses hierarchy and not the root of hierarchy.
 
+5.4 softlimit
+  Memory cgroup supports softlimit and has 2 parameters for control.
+
+    - memory.softlimit_in_bytes
+	softlimit for this cgroup
+
+    - memory.softlimit_priority
+	priority of this cgroup at softlimit reclaim
+	Allowed priority level is 0-8 and 0 is the lowest, 8 is the highest.
+        If 8 is specified, this will not be target of softlimit.
+
+  At memory shortage of the system (or local node/zone), softlimit helps
+  kswapd(), a global memory reclaim kernel thread, and informs victim cgroup
+  to be shrinked to kswapd.
+
+  Victim selection logic:
+  *Now*, static priority round-robin queue is used.
+
+  The kernel searches from the lowest priroty(0) up to the highest(7).
+  (priority (8) will never be scanned.)
+  If it finds a cgroup which has memory larger than softlimit, steal memory
+  from it. If multiple cgroups are on the same priority, each cgroup will be a
+  victim in turn.
+
+  Note: the kernel splits memory into zones and the system's memory shortage
+  is usually shorgage of zone's memory. So, even if a memcg'spriority is low,
+  it may not be selected because target zone's memory is not included in it.
+
+  Todo: some kind of dynamic-priority scheduler is fine.
 
 6. Hierarchy support
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
@ 2009-03-09  7:44   ` Balbir Singh
  2009-03-09  7:55     ` KAMEZAWA Hiroyuki
  2009-03-09  8:29     ` KAMEZAWA Hiroyuki
  0 siblings, 2 replies; 18+ messages in thread
From: Balbir Singh @ 2009-03-09  7:44 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:

> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> softlimit.priority and queue for softlimit is added in the next patch.
> 
> 
> Changelog v1->v2:
>  - For refactoring, divided a patch into 2 part and this patch just
>    involves memory.softlimit interface.
>  - Removed governor-detect routine, it was buggy in design.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 60 insertions(+), 2 deletions(-)


This patch breaks the semantics of resource counters. We would like to
use resource counters to track all overhead. I've refined my tracking
to an extent that the overhead does not show up at all, unless soft
limits kick in. I oppose keeping soft limits outside of resource
counters.


-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  7:44   ` Balbir Singh
@ 2009-03-09  7:55     ` KAMEZAWA Hiroyuki
  2009-03-09  8:48       ` Balbir Singh
  2009-03-09  8:29     ` KAMEZAWA Hiroyuki
  1 sibling, 1 reply; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  7:55 UTC (permalink / raw)
  To: balbir; +Cc: linux-mm, nishimura, kosaki.motohiro

On Mon, 9 Mar 2009 13:14:49 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> 
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> > softlimit.priority and queue for softlimit is added in the next patch.
> > 
> > 
> > Changelog v1->v2:
> >  - For refactoring, divided a patch into 2 part and this patch just
> >    involves memory.softlimit interface.
> >  - Removed governor-detect routine, it was buggy in design.
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > ---
> >  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 60 insertions(+), 2 deletions(-)
> 
> 
> This patch breaks the semantics of resource counters. We would like to
> use resource counters to track all overhead. I've refined my tracking
> to an extent that the overhead does not show up at all, unless soft
> limits kick in. I oppose keeping soft limits outside of resource
> counters.

Hmm, them, moving mem->softlimit to res->softlimit is ok ?

If no more "branch" to res_counter_charge/uncharge(), moving this to
res_counter is ok to me.


Thanks,
-Kame


> 
> -- 
> 	Balbir
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  7:44   ` Balbir Singh
  2009-03-09  7:55     ` KAMEZAWA Hiroyuki
@ 2009-03-09  8:29     ` KAMEZAWA Hiroyuki
  2009-03-09  8:54       ` Balbir Singh
  1 sibling, 1 reply; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  8:29 UTC (permalink / raw)
  To: balbir; +Cc: linux-mm, nishimura, kosaki.motohiro

On Mon, 9 Mar 2009 13:14:49 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> 
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> > softlimit.priority and queue for softlimit is added in the next patch.
> > 
> > 
> > Changelog v1->v2:
> >  - For refactoring, divided a patch into 2 part and this patch just
> >    involves memory.softlimit interface.
> >  - Removed governor-detect routine, it was buggy in design.
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > ---
> >  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 60 insertions(+), 2 deletions(-)
> 
> 
> This patch breaks the semantics of resource counters. We would like to
> use resource counters to track all overhead. I've refined my tracking
> to an extent that the overhead does not show up at all, unless soft
> limits kick in. I oppose keeping soft limits outside of resource
> counters.
> 

BTW, any other user of res_counter than memcg in future ?
I'm afraid that res_counter is decolated as chocolate-cake and will not taste
good for people who wants simple counter as simple pancake...

Thanks,
-Kame

Thanks,
-Kame



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  7:55     ` KAMEZAWA Hiroyuki
@ 2009-03-09  8:48       ` Balbir Singh
  2009-03-10  5:53         ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 18+ messages in thread
From: Balbir Singh @ 2009-03-09  8:48 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:55:07]:

> On Mon, 9 Mar 2009 13:14:49 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> 
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > 
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> > > softlimit.priority and queue for softlimit is added in the next patch.
> > > 
> > > 
> > > Changelog v1->v2:
> > >  - For refactoring, divided a patch into 2 part and this patch just
> > >    involves memory.softlimit interface.
> > >  - Removed governor-detect routine, it was buggy in design.
> > > 
> > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > ---
> > >  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> > >  1 file changed, 60 insertions(+), 2 deletions(-)
> > 
> > 
> > This patch breaks the semantics of resource counters. We would like to
> > use resource counters to track all overhead. I've refined my tracking
> > to an extent that the overhead does not show up at all, unless soft
> > limits kick in. I oppose keeping soft limits outside of resource
> > counters.
> 
> Hmm, them, moving mem->softlimit to res->softlimit is ok ?
> 
> If no more "branch" to res_counter_charge/uncharge(), moving this to
> res_counter is ok to me.
>

There is a branch, but the additional excessive checks are gone.
It should be possible to reduce the overhead to comparisons though. 

-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  8:29     ` KAMEZAWA Hiroyuki
@ 2009-03-09  8:54       ` Balbir Singh
  2009-03-09  9:07         ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 18+ messages in thread
From: Balbir Singh @ 2009-03-09  8:54 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 17:29:11]:

> On Mon, 9 Mar 2009 13:14:49 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> 
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > 
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> > > softlimit.priority and queue for softlimit is added in the next patch.
> > > 
> > > 
> > > Changelog v1->v2:
> > >  - For refactoring, divided a patch into 2 part and this patch just
> > >    involves memory.softlimit interface.
> > >  - Removed governor-detect routine, it was buggy in design.
> > > 
> > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > ---
> > >  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> > >  1 file changed, 60 insertions(+), 2 deletions(-)
> > 
> > 
> > This patch breaks the semantics of resource counters. We would like to
> > use resource counters to track all overhead. I've refined my tracking
> > to an extent that the overhead does not show up at all, unless soft
> > limits kick in. I oppose keeping soft limits outside of resource
> > counters.
> > 
> 
> BTW, any other user of res_counter than memcg in future ?

None so far.. but we once the core controllers are developed (CPU,
memory), I would expect IO, tasks, number of open files, etc to be
potential exploiters.

> I'm afraid that res_counter is decolated as chocolate-cake and will not taste
> good for people who wants simple counter as simple pancake...
> 


I think keeping the design modular has helped. This way we can
optimize resource counters without touching any controller. Only when
features are enabled is when people get the chocolate cake feeling,
not otherwise.

-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  8:54       ` Balbir Singh
@ 2009-03-09  9:07         ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-09  9:07 UTC (permalink / raw)
  To: balbir; +Cc: linux-mm, nishimura, kosaki.motohiro

On Mon, 9 Mar 2009 14:24:23 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 17:29:11]:
> 
> > On Mon, 9 Mar 2009 13:14:49 +0530
> > Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > 
> > > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > > 
> > > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > > Adds an interface for defining sotlimit per memcg. (no handler in this patch.)
> > > > softlimit.priority and queue for softlimit is added in the next patch.
> > > > 
> > > > 
> > > > Changelog v1->v2:
> > > >  - For refactoring, divided a patch into 2 part and this patch just
> > > >    involves memory.softlimit interface.
> > > >  - Removed governor-detect routine, it was buggy in design.
> > > > 
> > > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > > ---
> > > >  mm/memcontrol.c |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> > > >  1 file changed, 60 insertions(+), 2 deletions(-)
> > > 
> > > 
> > > This patch breaks the semantics of resource counters. We would like to
> > > use resource counters to track all overhead. I've refined my tracking
> > > to an extent that the overhead does not show up at all, unless soft
> > > limits kick in. I oppose keeping soft limits outside of resource
> > > counters.
> > > 
> > 
> > BTW, any other user of res_counter than memcg in future ?
> 
> None so far.. but we once the core controllers are developed (CPU,
> memory), I would expect IO, tasks, number of open files, etc to be
> potential exploiters.
> 
> > I'm afraid that res_counter is decolated as chocolate-cake and will not taste
> > good for people who wants simple counter as simple pancake...
> > 
> 
> 
> I think keeping the design modular has helped. This way we can
> optimize resource counters without touching any controller. Only when
> features are enabled is when people get the chocolate cake feeling,
> not otherwise.
> 

Hmm, maybe reducing overhead as per-cpu counter etc.. is necessary anyway.


Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-09  8:48       ` Balbir Singh
@ 2009-03-10  5:53         ` KAMEZAWA Hiroyuki
  2009-03-10  8:03           ` Balbir Singh
  2009-03-10  8:31           ` Balbir Singh
  0 siblings, 2 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-10  5:53 UTC (permalink / raw)
  To: balbir; +Cc: linux-mm, nishimura, kosaki.motohiro

On Mon, 9 Mar 2009 14:18:44 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:55:07]:
> 
> > On Mon, 9 Mar 2009 13:14:49 +0530
> > Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > 
> > > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > Hmm, them, moving mem->softlimit to res->softlimit is ok ?
> > 
> > If no more "branch" to res_counter_charge/uncharge(), moving this to
> > res_counter is ok to me.
> >
> 
> There is a branch, but the additional excessive checks are gone.
> It should be possible to reduce the overhead to comparisons though. 
> 

I'm now rewriting to use res_counter but do you have any good reason to
irq-off in res_counter ?
It seems there are no callers in irq path.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-10  5:53         ` KAMEZAWA Hiroyuki
@ 2009-03-10  8:03           ` Balbir Singh
  2009-03-10  8:31           ` Balbir Singh
  1 sibling, 0 replies; 18+ messages in thread
From: Balbir Singh @ 2009-03-10  8:03 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-10 14:53:34]:

> On Mon, 9 Mar 2009 14:18:44 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> 
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:55:07]:
> > 
> > > On Mon, 9 Mar 2009 13:14:49 +0530
> > > Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > > 
> > > > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > > Hmm, them, moving mem->softlimit to res->softlimit is ok ?
> > > 
> > > If no more "branch" to res_counter_charge/uncharge(), moving this to
> > > res_counter is ok to me.
> > >
> > 
> > There is a branch, but the additional excessive checks are gone.
> > It should be possible to reduce the overhead to comparisons though. 
> > 
> 
> I'm now rewriting to use res_counter but do you have any good reason to
> irq-off in res_counter ?
> It seems there are no callers in irq path.

It has been on my TODO list to make resource counter more efficient.
The reason for irq disabling is because counters routines can get called from
reclaim with irq's disabled as well.

-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function.
  2009-03-10  5:53         ` KAMEZAWA Hiroyuki
  2009-03-10  8:03           ` Balbir Singh
@ 2009-03-10  8:31           ` Balbir Singh
  1 sibling, 0 replies; 18+ messages in thread
From: Balbir Singh @ 2009-03-10  8:31 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-10 14:53:34]:

> On Mon, 9 Mar 2009 14:18:44 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> 
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:55:07]:
> > 
> > > On Mon, 9 Mar 2009 13:14:49 +0530
> > > Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > > 
> > > > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:39:07]:
> > > Hmm, them, moving mem->softlimit to res->softlimit is ok ?
> > > 
> > > If no more "branch" to res_counter_charge/uncharge(), moving this to
> > > res_counter is ok to me.
> > >
> > 
> > There is a branch, but the additional excessive checks are gone.
> > It should be possible to reduce the overhead to comparisons though. 
> > 
> 
> I'm now rewriting to use res_counter but do you have any good reason to
> irq-off in res_counter ?
> It seems there are no callers in irq path.

I have two proposals currently in mind

1. Convert the basic counter to atomic_long, 32 bit systems might need
   more consideration, since they use int for atomic_t
2. Use seq_lock's and see if that helps scalability.

I'll try and get to them shortly, unless someone else gets to them
first.

-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 3/4] memcg: softlimit caller via kswapd
  2009-03-09  7:42 ` [RFC][PATCH 3/4] memcg: softlimit caller via kswapd KAMEZAWA Hiroyuki
@ 2009-03-10 19:02   ` Balbir Singh
  2009-03-10 23:52     ` KAMEZAWA Hiroyuki
  2009-03-12  0:05     ` KOSAKI Motohiro
  0 siblings, 2 replies; 18+ messages in thread
From: Balbir Singh @ 2009-03-10 19:02 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm, nishimura, kosaki.motohiro

* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:42:18]:

> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 
> This patch adds hooks for memcg's softlimit to kswapd().
> 
> Softlimit handler is called...
>   - before generic shrink_zone() is called.
>   - # of pages to be scanned depends on priority.
>   - If not enough progress, selected memcg will be moved to UNUSED queue.
>   - at each call for balance_pgdat(), softlimit queue is rebalanced.
> 
> Changelog: v1->v2
>   - check "enough progress" or not.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  mm/vmscan.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> Index: develop/mm/vmscan.c
> ===================================================================
> --- develop.orig/mm/vmscan.c
> +++ develop/mm/vmscan.c
> @@ -1733,6 +1733,43 @@ unsigned long try_to_free_mem_cgroup_pag
>  }
>  #endif
> 
> +static void shrink_zone_softlimit(struct scan_control *sc, struct zone *zone,
> +			   int order, int priority, int target, int end_zone)
> +{
> +	int scan = SWAP_CLUSTER_MAX;
> +	int nid = zone->zone_pgdat->node_id;
> +	int zid = zone_idx(zone);
> +	int before;
> +	struct mem_cgroup *mem;
> +
> +	scan <<= (DEF_PRIORITY - priority);
> +	if (scan > (target * 2))
> +		scan = target * 2;
> +
> +	while (scan > 0) {
> +		if (zone_watermark_ok(zone, order, target, end_zone, 0))
> +			break;
> +		mem = mem_cgroup_schedule(nid, zid);
> +		if (!mem)
> +			return;
> +		sc->nr_scanned = 0;
> +		sc->mem_cgroup = mem;
> +		before = sc->nr_reclaimed;
> +		sc->isolate_pages = mem_cgroup_isolate_pages;
> +
> +		shrink_zone(priority, zone, sc);
> +
> +		if (sc->nr_reclaimed - before > scan/2)
> +			mem_cgroup_schedule_end(nid, zid, mem, true);
> +		else
> +			mem_cgroup_schedule_end(nid, zid, mem, false);
> +
> +		sc->mem_cgroup = NULL;
> +		sc->isolate_pages = isolate_pages_global;


Looks like a dirty hack, replacing sc-> fields this way. I've
experimented a lot with per zone balancing and soft limits and it does
not work well. The reasons

1. zone watermark balancing has a different goal than soft limit. Soft
limits are more of a mem cgroup feature rather than node/zone feature.
IIRC, you called reclaim as hot-path for soft limit reclaim, my
experimentation is beginning to show changed behaviour

On a system with 4 CPUs and 4 Nodes, I find all CPUs spending time
doing reclaim, putting the hook in the reclaim path, makes the reclaim
dependent on the number of tasks and contention.

What does your test data/experimentation show?

> +		scan -= sc->nr_scanned;
> +	}
> +	return;
> +}
>  /*
>   * For kswapd, balance_pgdat() will work across all this node's zones until
>   * they are all at pages_high.
> @@ -1776,6 +1813,8 @@ static unsigned long balance_pgdat(pg_da
>  	 */
>  	int temp_priority[MAX_NR_ZONES];
> 
> +	/* Refill softlimit queue */
> +	mem_cgroup_reschedule(pgdat->node_id);
>  loop_again:
>  	total_scanned = 0;
>  	sc.nr_reclaimed = 0;
> @@ -1856,6 +1895,9 @@ loop_again:
>  					       end_zone, 0))
>  				all_zones_ok = 0;
>  			temp_priority[i] = priority;
> +			/* Try soft limit at first */
> +			shrink_zone_softlimit(&sc, zone, order, priority,
> +					       8 * zone->pages_high, end_zone);
>  			sc.nr_scanned = 0;
>  			note_zone_scanning_priority(zone, priority);
>  			/*
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 

-- 
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 3/4] memcg: softlimit caller via kswapd
  2009-03-10 19:02   ` Balbir Singh
@ 2009-03-10 23:52     ` KAMEZAWA Hiroyuki
  2009-03-12  0:05     ` KOSAKI Motohiro
  1 sibling, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-10 23:52 UTC (permalink / raw)
  To: balbir; +Cc: linux-mm, nishimura, kosaki.motohiro

On Wed, 11 Mar 2009 00:32:42 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-09 16:42:18]:
> 
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Looks like a dirty hack, replacing sc-> fields this way. I've
> experimented a lot with per zone balancing and soft limits and it does
> not work well. The reasons
> 
> 1. zone watermark balancing has a different goal than soft limit. Soft
> limits are more of a mem cgroup feature rather than node/zone feature.
I can't catch what you want to say, here.

> IIRC, you called reclaim as hot-path for soft limit reclaim, my
> experimentation is beginning to show changed behaviour
> 
> On a system with 4 CPUs and 4 Nodes, I find all CPUs spending time
> doing reclaim, putting the hook in the reclaim path, makes the reclaim
> dependent on the number of tasks and contention.
> 
> What does your test data/experimentation show?
> 

Not done very pricrse test but I admit that can happen.
(BTW, 1 cpu per 1 node ?)
How to call this is the my main concern, now.

BTW, when you don't use softlimit, CPUs won't spend time in reclaim ?
If 1 cpu per 1 node, 1 kswapd per 1 node. So, it doesn't sound strange.

If it's better to add a softlimitd() for the system (means 1 thread for
the whole system), modification is not difficult.
(I think my code doesn't assume the caller is kswapd() other than /* comment */)

Thanks,
-Kame

> > +		scan -= sc->nr_scanned;
> > +	}
> > +	return;
> > +}
> >  /*
> >   * For kswapd, balance_pgdat() will work across all this node's zones until
> >   * they are all at pages_high.
> > @@ -1776,6 +1813,8 @@ static unsigned long balance_pgdat(pg_da
> >  	 */
> >  	int temp_priority[MAX_NR_ZONES];
> > 
> > +	/* Refill softlimit queue */
> > +	mem_cgroup_reschedule(pgdat->node_id);
> >  loop_again:
> >  	total_scanned = 0;
> >  	sc.nr_reclaimed = 0;
> > @@ -1856,6 +1895,9 @@ loop_again:
> >  					       end_zone, 0))
> >  				all_zones_ok = 0;
> >  			temp_priority[i] = priority;
> > +			/* Try soft limit at first */
> > +			shrink_zone_softlimit(&sc, zone, order, priority,
> > +					       8 * zone->pages_high, end_zone);
> >  			sc.nr_scanned = 0;
> >  			note_zone_scanning_priority(zone, priority);
> >  			/*
> > 
> > --
> > To unsubscribe, send a message with 'unsubscribe linux-mm' in
> > the body to majordomo@kvack.org.  For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> > 
> 
> -- 
> 	Balbir
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 3/4] memcg: softlimit caller via kswapd
  2009-03-10 19:02   ` Balbir Singh
  2009-03-10 23:52     ` KAMEZAWA Hiroyuki
@ 2009-03-12  0:05     ` KOSAKI Motohiro
  2009-03-12  0:08       ` KAMEZAWA Hiroyuki
  1 sibling, 1 reply; 18+ messages in thread
From: KOSAKI Motohiro @ 2009-03-12  0:05 UTC (permalink / raw)
  To: balbir; +Cc: kosaki.motohiro, KAMEZAWA Hiroyuki, linux-mm, nishimura

Hi Balbir-san,

> Looks like a dirty hack, replacing sc-> fields this way. I've
> experimented a lot with per zone balancing and soft limits and it does
> not work well. The reasons
> 
> 1. zone watermark balancing has a different goal than soft limit. Soft
> limits are more of a mem cgroup feature rather than node/zone feature.
> IIRC, you called reclaim as hot-path for soft limit reclaim, my
> experimentation is beginning to show changed behaviour
> 
> On a system with 4 CPUs and 4 Nodes, I find all CPUs spending time
> doing reclaim, putting the hook in the reclaim path, makes the reclaim
> dependent on the number of tasks and contention.
> 
> What does your test data/experimentation show?

you pointed out mainline kernel bug, not kamezawa patch's bug ;-)
Could you please try following patch?

sorry, this is definitly my fault.


---
 mm/vmscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index bfd853b..15f7737 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1470,7 +1470,7 @@ static void shrink_zone(int priority, struct zone *zone,
 		int file = is_file_lru(l);
 		int scan;
 
-		scan = zone_page_state(zone, NR_LRU_BASE + l);
+		scan = zone_nr_pages(zone, sc, l);
 		if (priority) {
 			scan >>= priority;
 			scan = (scan * percent[file]) / 100;
-- 
1.6.0.6



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [RFC][PATCH 3/4] memcg: softlimit caller via kswapd
  2009-03-12  0:05     ` KOSAKI Motohiro
@ 2009-03-12  0:08       ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-12  0:08 UTC (permalink / raw)
  To: KOSAKI Motohiro; +Cc: balbir, linux-mm, nishimura

On Thu, 12 Mar 2009 09:05:43 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> Hi Balbir-san,
> 
> > Looks like a dirty hack, replacing sc-> fields this way. I've
> > experimented a lot with per zone balancing and soft limits and it does
> > not work well. The reasons
> > 
> > 1. zone watermark balancing has a different goal than soft limit. Soft
> > limits are more of a mem cgroup feature rather than node/zone feature.
> > IIRC, you called reclaim as hot-path for soft limit reclaim, my
> > experimentation is beginning to show changed behaviour
> > 
> > On a system with 4 CPUs and 4 Nodes, I find all CPUs spending time
> > doing reclaim, putting the hook in the reclaim path, makes the reclaim
> > dependent on the number of tasks and contention.
> > 
> > What does your test data/experimentation show?
> 
> you pointed out mainline kernel bug, not kamezawa patch's bug ;-)
> Could you please try following patch?
> 
> sorry, this is definitly my fault.
> 
> 
Thank you!

-Kame


> ---
>  mm/vmscan.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index bfd853b..15f7737 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1470,7 +1470,7 @@ static void shrink_zone(int priority, struct zone *zone,
>  		int file = is_file_lru(l);
>  		int scan;
>  
> -		scan = zone_page_state(zone, NR_LRU_BASE + l);
> +		scan = zone_nr_pages(zone, sc, l);
>  		if (priority) {
>  			scan >>= priority;
>  			scan = (scan * percent[file]) / 100;
> -- 
> 1.6.0.6
> 
> 
> 
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-03-12  0:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09  7:37 [RFC][PATCH] memcg: softlimit (Another one) v3 KAMEZAWA Hiroyuki
2009-03-09  7:39 ` [RFC][PATCH 1/4] memcg: add softlimit interface and utilitiy function KAMEZAWA Hiroyuki
2009-03-09  7:44   ` Balbir Singh
2009-03-09  7:55     ` KAMEZAWA Hiroyuki
2009-03-09  8:48       ` Balbir Singh
2009-03-10  5:53         ` KAMEZAWA Hiroyuki
2009-03-10  8:03           ` Balbir Singh
2009-03-10  8:31           ` Balbir Singh
2009-03-09  8:29     ` KAMEZAWA Hiroyuki
2009-03-09  8:54       ` Balbir Singh
2009-03-09  9:07         ` KAMEZAWA Hiroyuki
2009-03-09  7:41 ` [RFC][PATCH 2/4] memcg: softlimit priority and victim scheduler KAMEZAWA Hiroyuki
2009-03-09  7:42 ` [RFC][PATCH 3/4] memcg: softlimit caller via kswapd KAMEZAWA Hiroyuki
2009-03-10 19:02   ` Balbir Singh
2009-03-10 23:52     ` KAMEZAWA Hiroyuki
2009-03-12  0:05     ` KOSAKI Motohiro
2009-03-12  0:08       ` KAMEZAWA Hiroyuki
2009-03-09  7:43 ` [RFC][PATCH 4/4] memcg: softlimit documenation KAMEZAWA Hiroyuki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.