aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2008-02-07 03:14:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:22 -0500
commit6c48a1d040a9a9eaa4acdd7d4cb3885e04bf8413 (patch)
tree2fcfb405b5664028d337a8a185c696c9c1f23e64 /include
parent5932f3671bb2dd873c5ac443cbf5dc2cd167ae94 (diff)
per-zone and reclaim enhancements for memory controller: remember reclaim priority in memory cgroup
Functions to remember reclaim priority per cgroup (as zone->prev_priority) [akpm@linux-foundation.org: build fixes] [akpm@linux-foundation.org: more build fixes] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Paul Menage <menage@google.com> Cc: Pavel Emelianov <xemul@openvz.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index bb9c079eeb0c..f82158faa494 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -70,6 +70,11 @@ extern void mem_cgroup_page_migration(struct page *page, struct page *newpage);
70extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem); 70extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
71extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem); 71extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
72 72
73extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
74extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
75 int priority);
76extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
77 int priority);
73 78
74 79
75#else /* CONFIG_CGROUP_MEM_CONT */ 80#else /* CONFIG_CGROUP_MEM_CONT */
@@ -153,6 +158,21 @@ static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem)
153 return 0; 158 return 0;
154} 159}
155 160
161static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
162{
163 return 0;
164}
165
166static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
167 int priority)
168{
169}
170
171static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
172 int priority)
173{
174}
175
156#endif /* CONFIG_CGROUP_MEM_CONT */ 176#endif /* CONFIG_CGROUP_MEM_CONT */
157 177
158#endif /* _LINUX_MEMCONTROL_H */ 178#endif /* _LINUX_MEMCONTROL_H */