aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memcontrol.h
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-12-16 06:19:59 -0500
committerAndi Kleen <ak@linux.intel.com>2009-12-16 06:19:59 -0500
commite42d9d5d47961fb5db0be65b56dd52fe7b2421f1 (patch)
tree6a898c8d43ee0533581076342b9a7a97cca0509e /include/linux/memcontrol.h
parent478c5ffc0b50527bd2390f2daa46cc16276b8413 (diff)
memcg: rename and export try_get_mem_cgroup_from_page()
So that the hwpoison injector can get mem_cgroup for arbitrary page and thus know whether it is owned by some mem_cgroup task(s). [AK: Merged with latest git tree] CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> CC: Hugh Dickins <hugh.dickins@tiscali.co.uk> CC: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> CC: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r--include/linux/memcontrol.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index bf9213b2db8f..fc9bae82ac42 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -68,6 +68,7 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
68extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); 68extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
69int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); 69int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
70 70
71extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page);
71extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); 72extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p);
72 73
73static inline 74static inline
@@ -189,6 +190,11 @@ mem_cgroup_move_lists(struct page *page, enum lru_list from, enum lru_list to)
189{ 190{
190} 191}
191 192
193static inline struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page)
194{
195 return NULL;
196}
197
192static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) 198static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem)
193{ 199{
194 return 1; 200 return 1;