All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages()
@ 2011-05-19 17:32 Ying Han
  2011-05-19 17:32 ` [PATCH V3 2/3] memcg: fix a routine for counting pages in node Ying Han
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ying Han @ 2011-05-19 17:32 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Johannes Weiner,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai
  Cc: linux-mm

The caller of the function has been renamed to zone_nr_lru_pages(), and this
is just fixing up in the memcg code. The current name is easily to be mis-read
as zone's total number of pages.

This patch is based on mmotm-2011-05-06-16-39

no change since v1.

Signed-off-by: Ying Han <yinghan@google.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
---
 include/linux/memcontrol.h |   10 +++++-----
 mm/memcontrol.c            |    6 +++---
 mm/vmscan.c                |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 77e47f5..22b3190 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -109,9 +109,9 @@ extern void mem_cgroup_end_migration(struct mem_cgroup *mem,
 int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
 int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg);
 int mem_cgroup_select_victim_node(struct mem_cgroup *memcg);
-unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
-				       struct zone *zone,
-				       enum lru_list lru);
+unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg,
+						struct zone *zone,
+						enum lru_list lru);
 struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
 						      struct zone *zone);
 struct zone_reclaim_stat*
@@ -306,8 +306,8 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg)
 }
 
 static inline unsigned long
-mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg, struct zone *zone,
-			 enum lru_list lru)
+mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, struct zone *zone,
+			     enum lru_list lru)
 {
 	return 0;
 }
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 95aecca..da183dc 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1151,9 +1151,9 @@ int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg)
 	return (active > inactive);
 }
 
-unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
-				       struct zone *zone,
-				       enum lru_list lru)
+unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg,
+						struct zone *zone,
+						enum lru_list lru)
 {
 	int nid = zone_to_nid(zone);
 	int zid = zone_idx(zone);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 292582c..fbbb958 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -172,7 +172,7 @@ static unsigned long zone_nr_lru_pages(struct zone *zone,
 				struct scan_control *sc, enum lru_list lru)
 {
 	if (!scanning_global_lru(sc))
-		return mem_cgroup_zone_nr_pages(sc->mem_cgroup, zone, lru);
+		return mem_cgroup_zone_nr_lru_pages(sc->mem_cgroup, zone, lru);
 
 	return zone_page_state(zone, NR_LRU_BASE + lru);
 }
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH V3 2/3] memcg: fix a routine for counting pages in node
  2011-05-19 17:32 [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() Ying Han
@ 2011-05-19 17:32 ` Ying Han
  2011-05-20  2:11   ` Daisuke Nishimura
  2011-05-19 17:32 ` [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics Ying Han
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Ying Han @ 2011-05-19 17:32 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Johannes Weiner,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai
  Cc: linux-mm

The value for counter base should be initialized. If not,
this returns wrong value.

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

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index da183dc..e14677c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -679,7 +679,7 @@ static unsigned long
 mem_cgroup_get_zonestat_node(struct mem_cgroup *mem, int nid, enum lru_list idx)
 {
 	struct mem_cgroup_per_zone *mz;
-	u64 total;
+	u64 total = 0;
 	int zid;
 
 	for (zid = 0; zid < MAX_NR_ZONES; zid++) {
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics
  2011-05-19 17:32 [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() Ying Han
  2011-05-19 17:32 ` [PATCH V3 2/3] memcg: fix a routine for counting pages in node Ying Han
@ 2011-05-19 17:32 ` Ying Han
  2011-05-19 23:51   ` KAMEZAWA Hiroyuki
  2011-05-19 23:50 ` [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() KAMEZAWA Hiroyuki
  2011-05-19 23:58 ` Minchan Kim
  3 siblings, 1 reply; 11+ messages in thread
From: Ying Han @ 2011-05-19 17:32 UTC (permalink / raw)
  To: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton,
	Li Zefan, Mel Gorman, Christoph Lameter, Johannes Weiner,
	Rik van Riel, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai
  Cc: linux-mm

The new API exports numa_maps per-memcg basis. This is a piece of useful
information where it exports per-memcg page distribution across real numa
nodes.

One of the usecase is evaluating application performance by combining this
information w/ the cpu allocation to the application.

The output of the memory.numastat tries to follow w/ simiar format of numa_maps
like:

total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...

$ cat /dev/cgroup/memory/memory.numa_stat
total=246594 N0=18225 N1=72025 N2=26378 N3=129966
file=221728 N0=15030 N1=60804 N2=23238 N3=122656
anon=21120 N0=2937 N1=7733 N2=3140 N3=7310

change v3..v2:
1. calculate the "total" based on the per-memcg lru size instead of rss+cache.
this makes the "total" value to be consistant w/ the per-node values follows
after.

change v2..v1:
1. add also the file and anon pages on per-node distribution.

Signed-off-by: Ying Han <yinghan@google.com>
---
 mm/memcontrol.c |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 120 insertions(+), 0 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e14677c..268d806 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1162,6 +1162,73 @@ unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg,
 	return MEM_CGROUP_ZSTAT(mz, lru);
 }
 
+
+unsigned long mem_cgroup_node_nr_file_lru_pages(struct mem_cgroup *memcg,
+						int nid)
+{
+	unsigned long ret;
+
+	ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_FILE) +
+		mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_FILE);
+
+	return ret;
+}
+
+unsigned long mem_cgroup_nr_file_lru_pages(struct mem_cgroup *memcg)
+{
+	u64 total = 0;
+	int nid;
+
+	for_each_node_state(nid, N_HIGH_MEMORY)
+		total += mem_cgroup_node_nr_file_lru_pages(memcg, nid);
+
+	return total;
+}
+
+unsigned long mem_cgroup_node_nr_anon_lru_pages(struct mem_cgroup *memcg,
+						int nid)
+{
+	unsigned long ret;
+
+	ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_ANON) +
+		mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_ANON);
+
+	return ret;
+}
+
+unsigned long mem_cgroup_nr_anon_lru_pages(struct mem_cgroup *memcg)
+{
+	u64 total = 0;
+	int nid;
+
+	for_each_node_state(nid, N_HIGH_MEMORY)
+		total += mem_cgroup_node_nr_anon_lru_pages(memcg, nid);
+
+	return total;
+}
+
+unsigned long mem_cgroup_node_nr_lru_pages(struct mem_cgroup *memcg, int nid)
+{
+	enum lru_list l;
+	u64 total = 0;
+
+	for_each_lru(l)
+		total += mem_cgroup_get_zonestat_node(memcg, nid, l);
+
+	return total;
+}
+
+unsigned long mem_cgroup_nr_lru_pages(struct mem_cgroup *memcg)
+{
+	u64 total = 0;
+	int nid;
+
+	for_each_node_state(nid, N_HIGH_MEMORY)
+		total += mem_cgroup_node_nr_lru_pages(memcg, nid);
+
+	return total;
+}
+
 struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
 						      struct zone *zone)
 {
@@ -4048,6 +4115,41 @@ mem_cgroup_get_total_stat(struct mem_cgroup *mem, struct mcs_total_stat *s)
 		mem_cgroup_get_local_stat(iter, s);
 }
 
+static int mem_control_numa_stat_show(struct seq_file *m, void *arg)
+{
+	int nid;
+	unsigned long total_nr, file_nr, anon_nr;
+	unsigned long node_nr;
+	struct cgroup *cont = m->private;
+	struct mem_cgroup *mem_cont = mem_cgroup_from_cont(cont);
+
+	total_nr = mem_cgroup_nr_lru_pages(mem_cont);
+	seq_printf(m, "total=%lu", total_nr);
+	for_each_node_state(nid, N_HIGH_MEMORY) {
+		node_nr = mem_cgroup_node_nr_lru_pages(mem_cont, nid);
+		seq_printf(m, " N%d=%lu", nid, node_nr);
+	}
+	seq_putc(m, '\n');
+
+	file_nr = mem_cgroup_nr_file_lru_pages(mem_cont);
+	seq_printf(m, "file=%lu", file_nr);
+	for_each_node_state(nid, N_HIGH_MEMORY) {
+		node_nr = mem_cgroup_node_nr_file_lru_pages(mem_cont, nid);
+		seq_printf(m, " N%d=%lu", nid, node_nr);
+	}
+	seq_putc(m, '\n');
+
+	anon_nr = mem_cgroup_nr_anon_lru_pages(mem_cont);
+	seq_printf(m, "anon=%lu", anon_nr);
+	for_each_node_state(nid, N_HIGH_MEMORY) {
+		node_nr = mem_cgroup_node_nr_anon_lru_pages(mem_cont, nid);
+		seq_printf(m, " N%d=%lu", nid, node_nr);
+	}
+	seq_putc(m, '\n');
+
+	return 0;
+}
+
 static int mem_control_stat_show(struct cgroup *cont, struct cftype *cft,
 				 struct cgroup_map_cb *cb)
 {
@@ -4481,6 +4583,20 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
 	return 0;
 }
 
+static const struct file_operations mem_control_numa_stat_file_operations = {
+	.read = seq_read,
+	.llseek = seq_lseek,
+	.release = single_release,
+};
+
+static int mem_control_numa_stat_open(struct inode *unused, struct file *file)
+{
+	struct cgroup *cont = file->f_dentry->d_parent->d_fsdata;
+
+	file->f_op = &mem_control_numa_stat_file_operations;
+	return single_open(file, mem_control_numa_stat_show, cont);
+}
+
 static struct cftype mem_cgroup_files[] = {
 	{
 		.name = "usage_in_bytes",
@@ -4544,6 +4660,10 @@ static struct cftype mem_cgroup_files[] = {
 		.unregister_event = mem_cgroup_oom_unregister_event,
 		.private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
 	},
+	{
+		.name = "numa_stat",
+		.open = mem_control_numa_stat_open,
+	},
 };
 
 #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages()
  2011-05-19 17:32 [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() Ying Han
  2011-05-19 17:32 ` [PATCH V3 2/3] memcg: fix a routine for counting pages in node Ying Han
  2011-05-19 17:32 ` [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics Ying Han
@ 2011-05-19 23:50 ` KAMEZAWA Hiroyuki
  2011-05-19 23:58 ` Minchan Kim
  3 siblings, 0 replies; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-19 23:50 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, Andrew Morton, Li Zefan, Mel Gorman,
	Christoph Lameter, Johannes Weiner, Rik van Riel, Hugh Dickins,
	Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Thu, 19 May 2011 10:32:38 -0700
Ying Han <yinghan@google.com> wrote:

> The caller of the function has been renamed to zone_nr_lru_pages(), and this
> is just fixing up in the memcg code. The current name is easily to be mis-read
> as zone's total number of pages.
> 
> This patch is based on mmotm-2011-05-06-16-39
> 
> no change since v1.
> 
> Signed-off-by: Ying Han <yinghan@google.com>
> 
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics
  2011-05-19 17:32 ` [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics Ying Han
@ 2011-05-19 23:51   ` KAMEZAWA Hiroyuki
  2011-05-20  0:11     ` Ying Han
  0 siblings, 1 reply; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-19 23:51 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, Andrew Morton, Li Zefan, Mel Gorman,
	Christoph Lameter, Johannes Weiner, Rik van Riel, Hugh Dickins,
	Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Thu, 19 May 2011 10:32:40 -0700
Ying Han <yinghan@google.com> wrote:

> The new API exports numa_maps per-memcg basis. This is a piece of useful
> information where it exports per-memcg page distribution across real numa
> nodes.
> 
> One of the usecase is evaluating application performance by combining this
> information w/ the cpu allocation to the application.
> 
> The output of the memory.numastat tries to follow w/ simiar format of numa_maps
> like:
> 
> total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
> file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
> anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
> 
> $ cat /dev/cgroup/memory/memory.numa_stat
> total=246594 N0=18225 N1=72025 N2=26378 N3=129966
> file=221728 N0=15030 N1=60804 N2=23238 N3=122656
> anon=21120 N0=2937 N1=7733 N2=3140 N3=7310
> 

Hmm ? this doesn't seem consistent....Isn't this log updated ?

Thanks,
-Kame

> change v3..v2:
> 1. calculate the "total" based on the per-memcg lru size instead of rss+cache.
> this makes the "total" value to be consistant w/ the per-node values follows
> after.
> 
> change v2..v1:
> 1. add also the file and anon pages on per-node distribution.
> 
> Signed-off-by: Ying Han <yinghan@google.com>
> ---
>  mm/memcontrol.c |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 120 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index e14677c..268d806 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1162,6 +1162,73 @@ unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg,
>  	return MEM_CGROUP_ZSTAT(mz, lru);
>  }
>  
> +
> +unsigned long mem_cgroup_node_nr_file_lru_pages(struct mem_cgroup *memcg,
> +						int nid)
> +{
> +	unsigned long ret;
> +
> +	ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_FILE) +
> +		mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_FILE);
> +
> +	return ret;
> +}
> +
> +unsigned long mem_cgroup_nr_file_lru_pages(struct mem_cgroup *memcg)
> +{
> +	u64 total = 0;
> +	int nid;
> +
> +	for_each_node_state(nid, N_HIGH_MEMORY)
> +		total += mem_cgroup_node_nr_file_lru_pages(memcg, nid);
> +
> +	return total;
> +}
> +
> +unsigned long mem_cgroup_node_nr_anon_lru_pages(struct mem_cgroup *memcg,
> +						int nid)
> +{
> +	unsigned long ret;
> +
> +	ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_ANON) +
> +		mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_ANON);
> +
> +	return ret;
> +}
> +
> +unsigned long mem_cgroup_nr_anon_lru_pages(struct mem_cgroup *memcg)
> +{
> +	u64 total = 0;
> +	int nid;
> +
> +	for_each_node_state(nid, N_HIGH_MEMORY)
> +		total += mem_cgroup_node_nr_anon_lru_pages(memcg, nid);
> +
> +	return total;
> +}
> +
> +unsigned long mem_cgroup_node_nr_lru_pages(struct mem_cgroup *memcg, int nid)
> +{
> +	enum lru_list l;
> +	u64 total = 0;
> +
> +	for_each_lru(l)
> +		total += mem_cgroup_get_zonestat_node(memcg, nid, l);
> +
> +	return total;
> +}
> +
> +unsigned long mem_cgroup_nr_lru_pages(struct mem_cgroup *memcg)
> +{
> +	u64 total = 0;
> +	int nid;
> +
> +	for_each_node_state(nid, N_HIGH_MEMORY)
> +		total += mem_cgroup_node_nr_lru_pages(memcg, nid);
> +
> +	return total;
> +}
> +
>  struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
>  						      struct zone *zone)
>  {
> @@ -4048,6 +4115,41 @@ mem_cgroup_get_total_stat(struct mem_cgroup *mem, struct mcs_total_stat *s)
>  		mem_cgroup_get_local_stat(iter, s);
>  }
>  
> +static int mem_control_numa_stat_show(struct seq_file *m, void *arg)
> +{
> +	int nid;
> +	unsigned long total_nr, file_nr, anon_nr;
> +	unsigned long node_nr;
> +	struct cgroup *cont = m->private;
> +	struct mem_cgroup *mem_cont = mem_cgroup_from_cont(cont);
> +
> +	total_nr = mem_cgroup_nr_lru_pages(mem_cont);
> +	seq_printf(m, "total=%lu", total_nr);
> +	for_each_node_state(nid, N_HIGH_MEMORY) {
> +		node_nr = mem_cgroup_node_nr_lru_pages(mem_cont, nid);
> +		seq_printf(m, " N%d=%lu", nid, node_nr);
> +	}
> +	seq_putc(m, '\n');
> +
> +	file_nr = mem_cgroup_nr_file_lru_pages(mem_cont);
> +	seq_printf(m, "file=%lu", file_nr);
> +	for_each_node_state(nid, N_HIGH_MEMORY) {
> +		node_nr = mem_cgroup_node_nr_file_lru_pages(mem_cont, nid);
> +		seq_printf(m, " N%d=%lu", nid, node_nr);
> +	}
> +	seq_putc(m, '\n');
> +
> +	anon_nr = mem_cgroup_nr_anon_lru_pages(mem_cont);
> +	seq_printf(m, "anon=%lu", anon_nr);
> +	for_each_node_state(nid, N_HIGH_MEMORY) {
> +		node_nr = mem_cgroup_node_nr_anon_lru_pages(mem_cont, nid);
> +		seq_printf(m, " N%d=%lu", nid, node_nr);
> +	}
> +	seq_putc(m, '\n');
> +
> +	return 0;
> +}
> +
>  static int mem_control_stat_show(struct cgroup *cont, struct cftype *cft,
>  				 struct cgroup_map_cb *cb)
>  {
> @@ -4481,6 +4583,20 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
>  	return 0;
>  }
>  
> +static const struct file_operations mem_control_numa_stat_file_operations = {
> +	.read = seq_read,
> +	.llseek = seq_lseek,
> +	.release = single_release,
> +};
> +
> +static int mem_control_numa_stat_open(struct inode *unused, struct file *file)
> +{
> +	struct cgroup *cont = file->f_dentry->d_parent->d_fsdata;
> +
> +	file->f_op = &mem_control_numa_stat_file_operations;
> +	return single_open(file, mem_control_numa_stat_show, cont);
> +}
> +
>  static struct cftype mem_cgroup_files[] = {
>  	{
>  		.name = "usage_in_bytes",
> @@ -4544,6 +4660,10 @@ static struct cftype mem_cgroup_files[] = {
>  		.unregister_event = mem_cgroup_oom_unregister_event,
>  		.private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
>  	},
> +	{
> +		.name = "numa_stat",
> +		.open = mem_control_numa_stat_open,
> +	},
>  };
>  
>  #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> -- 
> 1.7.3.1
> 
> 

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages()
  2011-05-19 17:32 [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() Ying Han
                   ` (2 preceding siblings ...)
  2011-05-19 23:50 ` [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() KAMEZAWA Hiroyuki
@ 2011-05-19 23:58 ` Minchan Kim
  3 siblings, 0 replies; 11+ messages in thread
From: Minchan Kim @ 2011-05-19 23:58 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Daisuke Nishimura, Balbir Singh, Tejun Heo,
	Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton, Li Zefan,
	Mel Gorman, Christoph Lameter, Johannes Weiner, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Fri, May 20, 2011 at 2:32 AM, Ying Han <yinghan@google.com> wrote:
> The caller of the function has been renamed to zone_nr_lru_pages(), and this
> is just fixing up in the memcg code. The current name is easily to be mis-read
> as zone's total number of pages.
>
> This patch is based on mmotm-2011-05-06-16-39
>
> no change since v1.
>
> Signed-off-by: Ying Han <yinghan@google.com>
>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

-- 
Kind regards,
Minchan Kim

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics
  2011-05-19 23:51   ` KAMEZAWA Hiroyuki
@ 2011-05-20  0:11     ` Ying Han
  2011-05-20  0:24       ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 11+ messages in thread
From: Ying Han @ 2011-05-20  0:11 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, Andrew Morton, Li Zefan, Mel Gorman,
	Christoph Lameter, Johannes Weiner, Rik van Riel, Hugh Dickins,
	Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

[-- Attachment #1: Type: text/plain, Size: 6879 bytes --]

On Thu, May 19, 2011 at 4:51 PM, KAMEZAWA Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Thu, 19 May 2011 10:32:40 -0700
> Ying Han <yinghan@google.com> wrote:
>
> > The new API exports numa_maps per-memcg basis. This is a piece of useful
> > information where it exports per-memcg page distribution across real numa
> > nodes.
> >
> > One of the usecase is evaluating application performance by combining
> this
> > information w/ the cpu allocation to the application.
> >
> > The output of the memory.numastat tries to follow w/ simiar format of
> numa_maps
> > like:
> >
> > total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
> >
> > $ cat /dev/cgroup/memory/memory.numa_stat
> > total=246594 N0=18225 N1=72025 N2=26378 N3=129966
> > file=221728 N0=15030 N1=60804 N2=23238 N3=122656
> > anon=21120 N0=2937 N1=7733 N2=3140 N3=7310
> >
>
> Hmm ? this doesn't seem consistent....Isn't this log updated ?
>

Nope. This is the V3 i posted w/ updated testing result.

--Ying


>
> Thanks,
> -Kame
>
> > change v3..v2:
> > 1. calculate the "total" based on the per-memcg lru size instead of
> rss+cache.
> > this makes the "total" value to be consistant w/ the per-node values
> follows
> > after.
> >
> > change v2..v1:
> > 1. add also the file and anon pages on per-node distribution.
> >
> > Signed-off-by: Ying Han <yinghan@google.com>
> > ---
> >  mm/memcontrol.c |  120
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 120 insertions(+), 0 deletions(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index e14677c..268d806 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -1162,6 +1162,73 @@ unsigned long mem_cgroup_zone_nr_lru_pages(struct
> mem_cgroup *memcg,
> >       return MEM_CGROUP_ZSTAT(mz, lru);
> >  }
> >
> > +
> > +unsigned long mem_cgroup_node_nr_file_lru_pages(struct mem_cgroup
> *memcg,
> > +                                             int nid)
> > +{
> > +     unsigned long ret;
> > +
> > +     ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_FILE) +
> > +             mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_FILE);
> > +
> > +     return ret;
> > +}
> > +
> > +unsigned long mem_cgroup_nr_file_lru_pages(struct mem_cgroup *memcg)
> > +{
> > +     u64 total = 0;
> > +     int nid;
> > +
> > +     for_each_node_state(nid, N_HIGH_MEMORY)
> > +             total += mem_cgroup_node_nr_file_lru_pages(memcg, nid);
> > +
> > +     return total;
> > +}
> > +
> > +unsigned long mem_cgroup_node_nr_anon_lru_pages(struct mem_cgroup
> *memcg,
> > +                                             int nid)
> > +{
> > +     unsigned long ret;
> > +
> > +     ret = mem_cgroup_get_zonestat_node(memcg, nid, LRU_INACTIVE_ANON) +
> > +             mem_cgroup_get_zonestat_node(memcg, nid, LRU_ACTIVE_ANON);
> > +
> > +     return ret;
> > +}
> > +
> > +unsigned long mem_cgroup_nr_anon_lru_pages(struct mem_cgroup *memcg)
> > +{
> > +     u64 total = 0;
> > +     int nid;
> > +
> > +     for_each_node_state(nid, N_HIGH_MEMORY)
> > +             total += mem_cgroup_node_nr_anon_lru_pages(memcg, nid);
> > +
> > +     return total;
> > +}
> > +
> > +unsigned long mem_cgroup_node_nr_lru_pages(struct mem_cgroup *memcg, int
> nid)
> > +{
> > +     enum lru_list l;
> > +     u64 total = 0;
> > +
> > +     for_each_lru(l)
> > +             total += mem_cgroup_get_zonestat_node(memcg, nid, l);
> > +
> > +     return total;
> > +}
> > +
> > +unsigned long mem_cgroup_nr_lru_pages(struct mem_cgroup *memcg)
> > +{
> > +     u64 total = 0;
> > +     int nid;
> > +
> > +     for_each_node_state(nid, N_HIGH_MEMORY)
> > +             total += mem_cgroup_node_nr_lru_pages(memcg, nid);
> > +
> > +     return total;
> > +}
> > +
> >  struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup
> *memcg,
> >                                                     struct zone *zone)
> >  {
> > @@ -4048,6 +4115,41 @@ mem_cgroup_get_total_stat(struct mem_cgroup *mem,
> struct mcs_total_stat *s)
> >               mem_cgroup_get_local_stat(iter, s);
> >  }
> >
> > +static int mem_control_numa_stat_show(struct seq_file *m, void *arg)
> > +{
> > +     int nid;
> > +     unsigned long total_nr, file_nr, anon_nr;
> > +     unsigned long node_nr;
> > +     struct cgroup *cont = m->private;
> > +     struct mem_cgroup *mem_cont = mem_cgroup_from_cont(cont);
> > +
> > +     total_nr = mem_cgroup_nr_lru_pages(mem_cont);
> > +     seq_printf(m, "total=%lu", total_nr);
> > +     for_each_node_state(nid, N_HIGH_MEMORY) {
> > +             node_nr = mem_cgroup_node_nr_lru_pages(mem_cont, nid);
> > +             seq_printf(m, " N%d=%lu", nid, node_nr);
> > +     }
> > +     seq_putc(m, '\n');
> > +
> > +     file_nr = mem_cgroup_nr_file_lru_pages(mem_cont);
> > +     seq_printf(m, "file=%lu", file_nr);
> > +     for_each_node_state(nid, N_HIGH_MEMORY) {
> > +             node_nr = mem_cgroup_node_nr_file_lru_pages(mem_cont, nid);
> > +             seq_printf(m, " N%d=%lu", nid, node_nr);
> > +     }
> > +     seq_putc(m, '\n');
> > +
> > +     anon_nr = mem_cgroup_nr_anon_lru_pages(mem_cont);
> > +     seq_printf(m, "anon=%lu", anon_nr);
> > +     for_each_node_state(nid, N_HIGH_MEMORY) {
> > +             node_nr = mem_cgroup_node_nr_anon_lru_pages(mem_cont, nid);
> > +             seq_printf(m, " N%d=%lu", nid, node_nr);
> > +     }
> > +     seq_putc(m, '\n');
> > +
> > +     return 0;
> > +}
> > +
> >  static int mem_control_stat_show(struct cgroup *cont, struct cftype
> *cft,
> >                                struct cgroup_map_cb *cb)
> >  {
> > @@ -4481,6 +4583,20 @@ static int mem_cgroup_oom_control_write(struct
> cgroup *cgrp,
> >       return 0;
> >  }
> >
> > +static const struct file_operations
> mem_control_numa_stat_file_operations = {
> > +     .read = seq_read,
> > +     .llseek = seq_lseek,
> > +     .release = single_release,
> > +};
> > +
> > +static int mem_control_numa_stat_open(struct inode *unused, struct file
> *file)
> > +{
> > +     struct cgroup *cont = file->f_dentry->d_parent->d_fsdata;
> > +
> > +     file->f_op = &mem_control_numa_stat_file_operations;
> > +     return single_open(file, mem_control_numa_stat_show, cont);
> > +}
> > +
> >  static struct cftype mem_cgroup_files[] = {
> >       {
> >               .name = "usage_in_bytes",
> > @@ -4544,6 +4660,10 @@ static struct cftype mem_cgroup_files[] = {
> >               .unregister_event = mem_cgroup_oom_unregister_event,
> >               .private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
> >       },
> > +     {
> > +             .name = "numa_stat",
> > +             .open = mem_control_numa_stat_open,
> > +     },
> >  };
> >
> >  #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
> > --
> > 1.7.3.1
> >
> >
>
>

[-- Attachment #2: Type: text/html, Size: 8792 bytes --]

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

* Re: [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics
  2011-05-20  0:11     ` Ying Han
@ 2011-05-20  0:24       ` KAMEZAWA Hiroyuki
  2011-05-20  1:31         ` Ying Han
  0 siblings, 1 reply; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-05-20  0:24 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, Andrew Morton, Li Zefan, Mel Gorman,
	Christoph Lameter, Johannes Weiner, Rik van Riel, Hugh Dickins,
	Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

On Thu, 19 May 2011 17:11:49 -0700
Ying Han <yinghan@google.com> wrote:

> On Thu, May 19, 2011 at 4:51 PM, KAMEZAWA Hiroyuki <
> kamezawa.hiroyu@jp.fujitsu.com> wrote:
> 
> > On Thu, 19 May 2011 10:32:40 -0700
> > Ying Han <yinghan@google.com> wrote:
> >
> > > The new API exports numa_maps per-memcg basis. This is a piece of useful
> > > information where it exports per-memcg page distribution across real numa
> > > nodes.
> > >
> > > One of the usecase is evaluating application performance by combining
> > this
> > > information w/ the cpu allocation to the application.
> > >
> > > The output of the memory.numastat tries to follow w/ simiar format of
> > numa_maps
> > > like:
> > >
> > > total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > > file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > > anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > >
> > > $ cat /dev/cgroup/memory/memory.numa_stat
> > > total=246594 N0=18225 N1=72025 N2=26378 N3=129966
> > > file=221728 N0=15030 N1=60804 N2=23238 N3=122656
> > > anon=21120 N0=2937 N1=7733 N2=3140 N3=7310
> > >
> >
> > Hmm ? this doesn't seem consistent....Isn't this log updated ?
> >
> 
> Nope. This is the V3 i posted w/ updated testing result.
> 

Did you get this log while applications are running and LRU are changing ?
See N1, 72505 != 60804 + 7733. big error.

Could you clarify why total != file + anon ? 
Does the number seems consistent when the system is calm ?

BTW, I wonder why unevictable is not shown...
mem_cgroup_node_nr_lru_pages() counts unevictable into it because of for_each_lru().

There are 2 ways.
 1. show unevictable
 2. use for_each_evictable_lru().

I vote for 1.


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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics
  2011-05-20  0:24       ` KAMEZAWA Hiroyuki
@ 2011-05-20  1:31         ` Ying Han
  0 siblings, 0 replies; 11+ messages in thread
From: Ying Han @ 2011-05-20  1:31 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki
  Cc: KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura, Balbir Singh,
	Tejun Heo, Pavel Emelyanov, Andrew Morton, Li Zefan, Mel Gorman,
	Christoph Lameter, Johannes Weiner, Rik van Riel, Hugh Dickins,
	Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

On Thu, May 19, 2011 at 5:24 PM, KAMEZAWA Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Thu, 19 May 2011 17:11:49 -0700
> Ying Han <yinghan@google.com> wrote:
>
> > On Thu, May 19, 2011 at 4:51 PM, KAMEZAWA Hiroyuki <
> > kamezawa.hiroyu@jp.fujitsu.com> wrote:
> >
> > > On Thu, 19 May 2011 10:32:40 -0700
> > > Ying Han <yinghan@google.com> wrote:
> > >
> > > > The new API exports numa_maps per-memcg basis. This is a piece of
> useful
> > > > information where it exports per-memcg page distribution across real
> numa
> > > > nodes.
> > > >
> > > > One of the usecase is evaluating application performance by combining
> > > this
> > > > information w/ the cpu allocation to the application.
> > > >
> > > > The output of the memory.numastat tries to follow w/ simiar format of
> > > numa_maps
> > > > like:
> > > >
> > > > total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > > > file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > > > anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
> > > >
> > > > $ cat /dev/cgroup/memory/memory.numa_stat
> > > > total=246594 N0=18225 N1=72025 N2=26378 N3=129966
> > > > file=221728 N0=15030 N1=60804 N2=23238 N3=122656
> > > > anon=21120 N0=2937 N1=7733 N2=3140 N3=7310
> > > >
> > >
> > > Hmm ? this doesn't seem consistent....Isn't this log updated ?
> > >
> >
> > Nope. This is the V3 i posted w/ updated testing result.
> >
>
> Did you get this log while applications are running and LRU are changing ?
> See N1, 72505 != 60804 + 7733. big error.
>

Could you clarify why total != file + anon ?
> Does the number seems consistent when the system is calm ?
>

 That is because the total includes "unevictable" which is not listed here
as "file" and "anon"

>
>
> BTW, I wonder why unevictable is not shown...
> mem_cgroup_node_nr_lru_pages() counts unevictable into it because of
> for_each_lru().
>
> There are 2 ways.
>  1. show unevictable
>  2. use for_each_evictable_lru().
>
> I vote for 1.
>

Sounds good to me, I can add the "unevictable" following the "file" and
"anon" on the next post.

Thanks for the review

--Ying

>
>
> Thanks,
> -Kame
>
>
>

[-- Attachment #2: Type: text/html, Size: 3933 bytes --]

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

* Re: [PATCH V3 2/3] memcg: fix a routine for counting pages in node
  2011-05-19 17:32 ` [PATCH V3 2/3] memcg: fix a routine for counting pages in node Ying Han
@ 2011-05-20  2:11   ` Daisuke Nishimura
  2011-05-20  2:54     ` Ying Han
  0 siblings, 1 reply; 11+ messages in thread
From: Daisuke Nishimura @ 2011-05-20  2:11 UTC (permalink / raw)
  To: Ying Han
  Cc: KOSAKI Motohiro, Minchan Kim, Balbir Singh, Tejun Heo,
	Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton, Li Zefan,
	Mel Gorman, Christoph Lameter, Johannes Weiner, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm,
	Daisuke Nishimura

Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>

This is a bugfix for memcg-reclaim-memory-from-nodes-in-round-robin-order.patch
in mmotm tree, so I think it would be better to note about it.

On Thu, 19 May 2011 10:32:39 -0700
Ying Han <yinghan@google.com> wrote:

> The value for counter base should be initialized. If not,
> this returns wrong value.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  mm/memcontrol.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index da183dc..e14677c 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -679,7 +679,7 @@ static unsigned long
>  mem_cgroup_get_zonestat_node(struct mem_cgroup *mem, int nid, enum lru_list idx)
>  {
>  	struct mem_cgroup_per_zone *mz;
> -	u64 total;
> +	u64 total = 0;
>  	int zid;
>  
>  	for (zid = 0; zid < MAX_NR_ZONES; zid++) {
> -- 
> 1.7.3.1
> 

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH V3 2/3] memcg: fix a routine for counting pages in node
  2011-05-20  2:11   ` Daisuke Nishimura
@ 2011-05-20  2:54     ` Ying Han
  0 siblings, 0 replies; 11+ messages in thread
From: Ying Han @ 2011-05-20  2:54 UTC (permalink / raw)
  To: Daisuke Nishimura
  Cc: KOSAKI Motohiro, Minchan Kim, Balbir Singh, Tejun Heo,
	Pavel Emelyanov, KAMEZAWA Hiroyuki, Andrew Morton, Li Zefan,
	Mel Gorman, Christoph Lameter, Johannes Weiner, Rik van Riel,
	Hugh Dickins, Michal Hocko, Dave Hansen, Zhu Yanhai, linux-mm

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

On Thu, May 19, 2011 at 7:11 PM, Daisuke Nishimura <
nishimura@mxp.nes.nec.co.jp> wrote:

> Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
>
> This is a bugfix for
> memcg-reclaim-memory-from-nodes-in-round-robin-order.patch
> in mmotm tree, so I think it would be better to note about it.
>

Sounds good, and I will add that comment in next post.

Thanks for reviewing it.

--Ying

>
> On Thu, 19 May 2011 10:32:39 -0700
> Ying Han <yinghan@google.com> wrote:
>
> > The value for counter base should be initialized. If not,
> > this returns wrong value.
> >
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > ---
> >  mm/memcontrol.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index da183dc..e14677c 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -679,7 +679,7 @@ static unsigned long
> >  mem_cgroup_get_zonestat_node(struct mem_cgroup *mem, int nid, enum
> lru_list idx)
> >  {
> >       struct mem_cgroup_per_zone *mz;
> > -     u64 total;
> > +     u64 total = 0;
> >       int zid;
> >
> >       for (zid = 0; zid < MAX_NR_ZONES; zid++) {
> > --
> > 1.7.3.1
> >
>
> --
> 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/ .
> Fight unfair telecom internet charges in Canada: sign
> http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>

[-- Attachment #2: Type: text/html, Size: 2730 bytes --]

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

end of thread, other threads:[~2011-05-20  2:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 17:32 [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() Ying Han
2011-05-19 17:32 ` [PATCH V3 2/3] memcg: fix a routine for counting pages in node Ying Han
2011-05-20  2:11   ` Daisuke Nishimura
2011-05-20  2:54     ` Ying Han
2011-05-19 17:32 ` [PATCH V3 3/3] memcg: add memory.numastat api for numa statistics Ying Han
2011-05-19 23:51   ` KAMEZAWA Hiroyuki
2011-05-20  0:11     ` Ying Han
2011-05-20  0:24       ` KAMEZAWA Hiroyuki
2011-05-20  1:31         ` Ying Han
2011-05-19 23:50 ` [PATCH V3 1/3] memcg: rename mem_cgroup_zone_nr_pages() to mem_cgroup_zone_nr_lru_pages() KAMEZAWA Hiroyuki
2011-05-19 23:58 ` Minchan Kim

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.