aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <[email protected]>2008-02-07 00:14:34 -0800
committerLinus Torvalds <[email protected]>2008-02-07 08:42:22 -0800
commit6c48a1d040a9a9eaa4acdd7d4cb3885e04bf8413 (patch)
tree2fcfb405b5664028d337a8a185c696c9c1f23e64 /include/linux
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) [[email protected]: build fixes] [[email protected]: more build fixes] Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Balbir Singh <[email protected]> Cc: David Rientjes <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: Kirill Korotaev <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Paul Menage <[email protected]> Cc: Pavel Emelianov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Vaidyanathan Srinivasan <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-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);
extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem);
extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem);
+extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem);
+extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
+ int priority);
+extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
+ int priority);
#else /* CONFIG_CGROUP_MEM_CONT */
@@ -153,6 +158,21 @@ static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem)
return 0;
}
+static inline int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem)
+{
+ return 0;
+}
+
+static inline void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
+ int priority)
+{
+}
+
+static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
+ int priority)
+{
+}
+
#endif /* CONFIG_CGROUP_MEM_CONT */
#endif /* _LINUX_MEMCONTROL_H */