aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6611328460e9..313247e6c503 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -186,7 +186,6 @@ pcg_default_flags[NR_CHARGE_TYPE] = {
186 0, /* FORCE */ 186 0, /* FORCE */
187}; 187};
188 188
189
190/* for encoding cft->private value on file */ 189/* for encoding cft->private value on file */
191#define _MEM (0) 190#define _MEM (0)
192#define _MEMSWAP (1) 191#define _MEMSWAP (1)
@@ -448,6 +447,17 @@ int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg, struct zone *zone)
448 return 0; 447 return 0;
449} 448}
450 449
450unsigned long mem_cgroup_zone_nr_pages(struct mem_cgroup *memcg,
451 struct zone *zone,
452 enum lru_list lru)
453{
454 int nid = zone->zone_pgdat->node_id;
455 int zid = zone_idx(zone);
456 struct mem_cgroup_per_zone *mz = mem_cgroup_zoneinfo(memcg, nid, zid);
457
458 return MEM_CGROUP_ZSTAT(mz, lru);
459}
460
451unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 461unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
452 struct list_head *dst, 462 struct list_head *dst,
453 unsigned long *scanned, int order, 463 unsigned long *scanned, int order,