Thread (34 messages) 34 messages, 4 authors, 2011-06-27

Re: [PATCH 3/7] memcg: add memory.scan_stat

From: KAMEZAWA Hiroyuki <hidden>
Date: 2011-06-27 01:57:27
Also in: lkml

On Fri, 24 Jun 2011 14:40:42 -0700
Ying Han [off-list ref] wrote:
On Tue, Jun 21, 2011 at 5:20 PM, KAMEZAWA Hiroyuki
[off-list ref] wrote:
quoted
On Mon, 20 Jun 2011 23:49:54 -0700
Ying Han [off-list ref] wrote:
quoted
On Wed, Jun 15, 2011 at 8:53 PM, KAMEZAWA Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com> wrote:
quoted
From e08990dd9ada13cf236bec1ef44b207436434b8e Mon Sep 17 00:00:00 2001
From: KAMEZAWA Hiroyuki <redacted>
Date: Wed, 15 Jun 2011 14:11:01 +0900
Subject: [PATCH 3/7] memcg: add memory.scan_stat
quoted hunk ↗ jump to hunk
quoted
quoted
quoted
+
+struct scanstat {
+ A  A  A  spinlock_t A  A  A lock;
+ A  A  A  unsigned long A  stats[NR_SCANSTATS]; A  A /* local statistics */
+ A  A  A  unsigned long A  totalstats[NR_SCANSTATS]; A  /* hierarchical */
+};
I wonder why not extending the mem_cgroup_stat_cpu struct, and then we
can use the per-cpu counters like others.
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b7d2d79..5b8bbe9 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -138,6 +138,7 @@ struct mem_cgroup_stat_cpu {
        long count[MEM_CGROUP_STAT_NSTATS];
        unsigned long events[MEM_CGROUP_EVENTS_NSTATS];
        unsigned long targets[MEM_CGROUP_NTARGETS];
+       unsigned long reclaim_stats[MEMCG_RECLAIM_NSTATS];
 };
Hmm, do we have enough benefit to consume 72 bytes per cpu and make
read-side slow for this rarely updated counter ?

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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help