diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2012-05-29 18:07:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:26 -0400 |
commit | c56d5c7dfeb5cc754e17fa3d423086a3c551c219 (patch) | |
tree | 4c89ad9692dbd3a2e0eaf96de0162a5d3066925e /include/linux/memcontrol.h | |
parent | 074291fea8bcedeabf295360e2ddd9bbb5830b4a (diff) |
mm/vmscan: push lruvec pointer into inactive_list_is_low()
Switch mem_cgroup_inactive_anon_is_low() to lruvec pointers,
mem_cgroup_get_lruvec_size() is more effective than
mem_cgroup_zone_nr_lru_pages()
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Hugh Dickins <hughd@google.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 | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index ccb3e3c65dd2..fc81dc244309 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -118,10 +118,8 @@ void mem_cgroup_iter_break(struct mem_cgroup *, struct mem_cgroup *); | |||
118 | /* | 118 | /* |
119 | * For memory reclaim. | 119 | * For memory reclaim. |
120 | */ | 120 | */ |
121 | int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, | 121 | int mem_cgroup_inactive_anon_is_low(struct lruvec *lruvec); |
122 | struct zone *zone); | 122 | int mem_cgroup_inactive_file_is_low(struct lruvec *lruvec); |
123 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, | ||
124 | struct zone *zone); | ||
125 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); | 123 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
126 | unsigned long mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list); | 124 | unsigned long mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list); |
127 | struct zone_reclaim_stat* | 125 | struct zone_reclaim_stat* |
@@ -330,13 +328,13 @@ static inline bool mem_cgroup_disabled(void) | |||
330 | } | 328 | } |
331 | 329 | ||
332 | static inline int | 330 | static inline int |
333 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone) | 331 | mem_cgroup_inactive_anon_is_low(struct lruvec *lruvec) |
334 | { | 332 | { |
335 | return 1; | 333 | return 1; |
336 | } | 334 | } |
337 | 335 | ||
338 | static inline int | 336 | static inline int |
339 | mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, struct zone *zone) | 337 | mem_cgroup_inactive_file_is_low(struct lruvec *lruvec) |
340 | { | 338 | { |
341 | return 1; | 339 | return 1; |
342 | } | 340 | } |