]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: fix event counting breakage from recent THP update
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tue, 1 Feb 2011 23:52:45 +0000 (15:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Feb 2011 00:03:19 +0000 (16:03 -0800)
commit654483cea2bf6820c4a4df5f90c2ea461497806f
treef0bbefb76a4fc328ca441bd71fc49a5a091bb323
parente626f3804e87d5828aaf3886b1bb04b604c9d1b2
memcg: fix event counting breakage from recent THP update

Changes in c31106cef ("memcg: modify accounting function for supporting
THP better") 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.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c