diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2010-05-24 17:32:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:07:00 -0400 |
commit | 8b25c6d2231b978ccce9c401e771932bde79aa9f (patch) | |
tree | 13845799e14e49465de1529680df7def59dcfeb8 /include/linux/memcontrol.h | |
parent | 0aeb2339e54e40d0788a7017ecaeac7f5271e262 (diff) |
vmscan: remove isolate_pages callback scan control
For now, we have global isolation vs. memory control group isolation, do
not allow the reclaim entry function to set an arbitrary page isolation
callback, we do not need that flexibility.
And since we already pass around the group descriptor for the memory
control group isolation case, just use it to decide which one of the two
isolator functions to use.
The decisions can be merged into nearby branches, so no extra cost there.
In fact, we save the indirect calls.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
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/linux/memcontrol.h')
-rw-r--r-- | include/linux/memcontrol.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 44301c6affa8..05894795fdc1 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -25,6 +25,13 @@ struct page_cgroup; | |||
25 | struct page; | 25 | struct page; |
26 | struct mm_struct; | 26 | struct mm_struct; |
27 | 27 | ||
28 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | ||
29 | struct list_head *dst, | ||
30 | unsigned long *scanned, int order, | ||
31 | int mode, struct zone *z, | ||
32 | struct mem_cgroup *mem_cont, | ||
33 | int active, int file); | ||
34 | |||
28 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 35 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
29 | /* | 36 | /* |
30 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 37 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
@@ -64,12 +71,6 @@ extern void mem_cgroup_uncharge_cache_page(struct page *page); | |||
64 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, | 71 | extern int mem_cgroup_shmem_charge_fallback(struct page *page, |
65 | struct mm_struct *mm, gfp_t gfp_mask); | 72 | struct mm_struct *mm, gfp_t gfp_mask); |
66 | 73 | ||
67 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | ||
68 | struct list_head *dst, | ||
69 | unsigned long *scanned, int order, | ||
70 | int mode, struct zone *z, | ||
71 | struct mem_cgroup *mem_cont, | ||
72 | int active, int file); | ||
73 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); | 74 | extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); |
74 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | 75 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); |
75 | 76 | ||