* [PATCH] memcg: fix event counting breakage by recent THP update
@ 2011-02-01 0:12 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-02-01 0:12 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, linux-mm, hannes, nishimura, balbir
Thanks to Johannes for catching this.
And sorry for my patch, I'd like to consinder some debug check..
=
Changes in commit e401f1761c0b01966e36e41e2c385d455a7b44ee
adds nr_pages to support multiple page size in memory_cgroup_charge_statistics.
But counting the number of event nees abs(nr_pages) for increasing
counters. This patch fixes event counting.
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: mmotm-0125/mm/memcontrol.c
===================================================================
--- mmotm-0125.orig/mm/memcontrol.c
+++ mmotm-0125/mm/memcontrol.c
@@ -612,8 +612,10 @@ static void mem_cgroup_charge_statistics
/* pagein of a big page is an event. So, ignore page size */
if (nr_pages > 0)
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGIN_COUNT]);
- else
+ else {
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGOUT_COUNT]);
+ nr_pages = -nr_pages; /* for event */
+ }
__this_cpu_add(mem->stat->count[MEM_CGROUP_EVENTS], nr_pages);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] memcg: fix event counting breakage by recent THP update
@ 2011-02-01 0:12 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-02-01 0:12 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, linux-mm, hannes, nishimura, balbir
Thanks to Johannes for catching this.
And sorry for my patch, I'd like to consinder some debug check..
=
Changes in commit e401f1761c0b01966e36e41e2c385d455a7b44ee
adds nr_pages to support multiple page size in memory_cgroup_charge_statistics.
But counting the number of event nees abs(nr_pages) for increasing
counters. This patch fixes event counting.
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/memcontrol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: mmotm-0125/mm/memcontrol.c
===================================================================
--- mmotm-0125.orig/mm/memcontrol.c
+++ mmotm-0125/mm/memcontrol.c
@@ -612,8 +612,10 @@ static void mem_cgroup_charge_statistics
/* pagein of a big page is an event. So, ignore page size */
if (nr_pages > 0)
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGIN_COUNT]);
- else
+ else {
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGOUT_COUNT]);
+ nr_pages = -nr_pages; /* for event */
+ }
__this_cpu_add(mem->stat->count[MEM_CGROUP_EVENTS], nr_pages);
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memcg: fix event counting breakage by recent THP update
2011-02-01 0:12 ` KAMEZAWA Hiroyuki
@ 2011-02-01 9:34 ` Johannes Weiner
-1 siblings, 0 replies; 4+ messages in thread
From: Johannes Weiner @ 2011-02-01 9:34 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: akpm, linux-kernel, linux-mm, nishimura, balbir
On Tue, Feb 01, 2011 at 09:12:08AM +0900, KAMEZAWA Hiroyuki wrote:
>
> Thanks to Johannes for catching this.
> And sorry for my patch, I'd like to consinder some debug check..
> =
> Changes in commit e401f1761c0b01966e36e41e2c385d455a7b44ee
> adds nr_pages to support multiple page size in memory_cgroup_charge_statistics.
>
> But counting the number of event nees abs(nr_pages) for increasing
> counters. This patch fixes event counting.
>
> Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] memcg: fix event counting breakage by recent THP update
@ 2011-02-01 9:34 ` Johannes Weiner
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Weiner @ 2011-02-01 9:34 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: akpm, linux-kernel, linux-mm, nishimura, balbir
On Tue, Feb 01, 2011 at 09:12:08AM +0900, KAMEZAWA Hiroyuki wrote:
>
> Thanks to Johannes for catching this.
> And sorry for my patch, I'd like to consinder some debug check..
> =
> Changes in commit e401f1761c0b01966e36e41e2c385d455a7b44ee
> adds nr_pages to support multiple page size in memory_cgroup_charge_statistics.
>
> But counting the number of event nees abs(nr_pages) for increasing
> counters. This patch fixes event counting.
>
> Reported-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
--
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 policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-01 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 0:12 [PATCH] memcg: fix event counting breakage by recent THP update KAMEZAWA Hiroyuki
2011-02-01 0:12 ` KAMEZAWA Hiroyuki
2011-02-01 9:34 ` Johannes Weiner
2011-02-01 9:34 ` Johannes Weiner
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.