aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2009-04-02 19:57:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:04:55 -0400
commite222432bfa7dcf6ec008622a978c9f284ed5e3a9 (patch)
treeb006f569cb66523a5644ad0ef1669b051ccda907 /include
parent0b7f569e45bb6be142d87017030669a6a7d327a1 (diff)
memcg: show memcg information during OOM
Add RSS and swap to OOM output from memcg Display memcg values like failcnt, usage and limit when an OOM occurs due to memcg. Thanks to Johannes Weiner, Li Zefan, David Rientjes, Kamezawa Hiroyuki, Daisuke Nishimura and KOSAKI Motohiro for review. Sample output ------------- Task in /a/x killed as a result of limit of /a memory: usage 1048576kB, limit 1048576kB, failcnt 4183 memory+swap: usage 1400964kB, limit 9007199254740991kB, failcnt 0 [akpm@linux-foundation.org: compilation fix] [akpm@linux-foundation.org: fix kerneldoc and whitespace] [akpm@linux-foundation.org: add printk facility level] Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/memcontrol.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 326f45c86530..7aba9f264622 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -104,6 +104,8 @@ struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
104 struct zone *zone); 104 struct zone *zone);
105struct zone_reclaim_stat* 105struct zone_reclaim_stat*
106mem_cgroup_get_reclaim_stat_from_page(struct page *page); 106mem_cgroup_get_reclaim_stat_from_page(struct page *page);
107extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
108 struct task_struct *p);
107 109
108#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 110#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
109extern int do_swap_account; 111extern int do_swap_account;
@@ -270,6 +272,11 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page)
270 return NULL; 272 return NULL;
271} 273}
272 274
275static inline void
276mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
277{
278}
279
273#endif /* CONFIG_CGROUP_MEM_CONT */ 280#endif /* CONFIG_CGROUP_MEM_CONT */
274 281
275#endif /* _LINUX_MEMCONTROL_H */ 282#endif /* _LINUX_MEMCONTROL_H */