aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-01-07 21:08:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:08 -0500
commit9439c1c95b5c25b8031b2a7eb7e1590eb84be7f5 (patch)
tree79eaae56278407e0a223e562a2d0079834ca5529 /mm/memcontrol.c
parent3e2f41f1f64744f7942980d93cc93dd3e5924560 (diff)
memcg: remove mem_cgroup_cal_reclaim()
Now, get_scan_ratio() return correct value although memcg reclaim. Then, mem_cgroup_calc_reclaim() can be removed. So, memcg reclaim get the same capability of anon/file reclaim balancing as global reclaim now. Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@redhat.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Hugh Dickins <hugh@veritas.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7b7f4dc05035..b8c1e5acc25a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -414,27 +414,6 @@ void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, int priority)
414 mem->prev_priority = priority; 414 mem->prev_priority = priority;
415} 415}
416 416
417/*
418 * Calculate # of pages to be scanned in this priority/zone.
419 * See also vmscan.c
420 *
421 * priority starts from "DEF_PRIORITY" and decremented in each loop.
422 * (see include/linux/mmzone.h)
423 */
424
425long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone,
426 int priority, enum lru_list lru)
427{
428 long nr_pages;
429 int nid = zone->zone_pgdat->node_id;
430 int zid = zone_idx(zone);
431 struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(mem, nid, zid);
432
433 nr_pages = MEM_CGROUP_ZSTAT(mz, lru);
434
435 return (nr_pages >> priority);
436}
437
438int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone) 417int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone)
439{ 418{
440 unsigned long active; 419 unsigned long active;