diff options
-rw-r--r-- | include/linux/memcontrol.h | 6 | ||||
-rw-r--r-- | mm/memcontrol.c | 17 |
2 files changed, 0 insertions, 23 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 7aba9f264622..4562d09ab964 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -88,7 +88,6 @@ extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
88 | /* | 88 | /* |
89 | * For memory reclaim. | 89 | * For memory reclaim. |
90 | */ | 90 | */ |
91 | extern int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem); | ||
92 | extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem); | 91 | extern long mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem); |
93 | 92 | ||
94 | extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem); | 93 | extern int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem); |
@@ -211,11 +210,6 @@ static inline void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
211 | { | 210 | { |
212 | } | 211 | } |
213 | 212 | ||
214 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) | ||
215 | { | ||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem) | 213 | static inline int mem_cgroup_reclaim_imbalance(struct mem_cgroup *mem) |
220 | { | 214 | { |
221 | return 0; | 215 | return 0; |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 2bdb6149faeb..7bb14fdc780c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -508,23 +508,6 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) | |||
508 | } | 508 | } |
509 | 509 | ||
510 | /* | 510 | /* |
511 | * Calculate mapped_ratio under memory controller. This will be used in | ||
512 | * vmscan.c for deteremining we have to reclaim mapped pages. | ||
513 | */ | ||
514 | int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) | ||
515 | { | ||
516 | long total, rss; | ||
517 | |||
518 | /* | ||
519 | * usage is recorded in bytes. But, here, we assume the number of | ||
520 | * physical pages can be represented by "long" on any arch. | ||
521 | */ | ||
522 | total = (long) (mem->res.usage >> PAGE_SHIFT) + 1L; | ||
523 | rss = (long)mem_cgroup_read_stat(&mem->stat, MEM_CGROUP_STAT_RSS); | ||
524 | return (int)((rss * 100L) / total); | ||
525 | } | ||
526 | |||
527 | /* | ||
528 | * prev_priority control...this will be used in memory reclaim path. | 511 | * prev_priority control...this will be used in memory reclaim path. |
529 | */ | 512 | */ |
530 | int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) | 513 | int mem_cgroup_get_reclaim_priority(struct mem_cgroup *mem) |