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>
This commit is contained in:
committed by
Linus Torvalds
parent
3e2f41f1f6
commit
9439c1c95b
@@ -414,27 +414,6 @@ void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, int priority)
|
||||
mem->prev_priority = priority;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate # of pages to be scanned in this priority/zone.
|
||||
* See also vmscan.c
|
||||
*
|
||||
* priority starts from "DEF_PRIORITY" and decremented in each loop.
|
||||
* (see include/linux/mmzone.h)
|
||||
*/
|
||||
|
||||
long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone,
|
||||
int priority, enum lru_list lru)
|
||||
{
|
||||
long nr_pages;
|
||||
int nid = zone->zone_pgdat->node_id;
|
||||
int zid = zone_idx(zone);
|
||||
struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(mem, nid, zid);
|
||||
|
||||
nr_pages = MEM_CGROUP_ZSTAT(mz, lru);
|
||||
|
||||
return (nr_pages >> priority);
|
||||
}
|
||||
|
||||
int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone)
|
||||
{
|
||||
unsigned long active;
|
||||
|
Reference in New Issue
Block a user