diff options
author | Hugh Dickins <hughd@google.com> | 2012-05-29 18:07:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:28 -0400 |
commit | 4d7dcca213921fbaf08ee05359d28e4aaf2245f1 (patch) | |
tree | 1c31ea8e8f9f88ca60864fbdaf9dfa74b09be96f /mm/memcontrol.c | |
parent | af7c4b0ec257ea9abb9c6749dd5a5ba0b8fae1fd (diff) |
mm/memcg: get_lru_size not get_lruvec_size
Konstantin just introduced mem_cgroup_get_lruvec_size() and
get_lruvec_size(), I'm about to add mem_cgroup_update_lru_size(): but
we're dealing with the same thing, lru_size[lru]. We ought to agree on
the naming, and I do think lru_size is the more correct: so rename his
ones to get_lru_size().
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 35e008e25422..75198dac3fe8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -737,7 +737,7 @@ static void mem_cgroup_charge_statistics(struct mem_cgroup *memcg, | |||
737 | } | 737 | } |
738 | 738 | ||
739 | unsigned long | 739 | unsigned long |
740 | mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list lru) | 740 | mem_cgroup_get_lru_size(struct lruvec *lruvec, enum lru_list lru) |
741 | { | 741 | { |
742 | struct mem_cgroup_per_zone *mz; | 742 | struct mem_cgroup_per_zone *mz; |
743 | 743 | ||
@@ -1229,8 +1229,8 @@ int mem_cgroup_inactive_anon_is_low(struct lruvec *lruvec) | |||
1229 | unsigned long active; | 1229 | unsigned long active; |
1230 | unsigned long gb; | 1230 | unsigned long gb; |
1231 | 1231 | ||
1232 | inactive = mem_cgroup_get_lruvec_size(lruvec, LRU_INACTIVE_ANON); | 1232 | inactive = mem_cgroup_get_lru_size(lruvec, LRU_INACTIVE_ANON); |
1233 | active = mem_cgroup_get_lruvec_size(lruvec, LRU_ACTIVE_ANON); | 1233 | active = mem_cgroup_get_lru_size(lruvec, LRU_ACTIVE_ANON); |
1234 | 1234 | ||
1235 | gb = (inactive + active) >> (30 - PAGE_SHIFT); | 1235 | gb = (inactive + active) >> (30 - PAGE_SHIFT); |
1236 | if (gb) | 1236 | if (gb) |
@@ -1246,8 +1246,8 @@ int mem_cgroup_inactive_file_is_low(struct lruvec *lruvec) | |||
1246 | unsigned long active; | 1246 | unsigned long active; |
1247 | unsigned long inactive; | 1247 | unsigned long inactive; |
1248 | 1248 | ||
1249 | inactive = mem_cgroup_get_lruvec_size(lruvec, LRU_INACTIVE_FILE); | 1249 | inactive = mem_cgroup_get_lru_size(lruvec, LRU_INACTIVE_FILE); |
1250 | active = mem_cgroup_get_lruvec_size(lruvec, LRU_ACTIVE_FILE); | 1250 | active = mem_cgroup_get_lru_size(lruvec, LRU_ACTIVE_FILE); |
1251 | 1251 | ||
1252 | return (active > inactive); | 1252 | return (active > inactive); |
1253 | } | 1253 | } |