aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorVincent Li <macli@brc.ubc.ca>2009-09-21 20:03:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:38 -0400
commit0b21767637c3c99890a248fe47ac414e51cf5eb7 (patch)
treeebedeecddd3e8d7d665464c4fadbea40ee43a317 /mm
parent2c85f51d222ccdd8c401d77a36b723a89156810d (diff)
mm/vmscan: rename zone_nr_pages() to zone_nr_lru_pages()
The name `zone_nr_pages' can be mis-read as zone's (total) number pages, but it actually returns zone's LRU list number pages. Signed-off-by: Vincent Li <macli@brc.ubc.ca> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@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')
-rw-r--r--mm/vmscan.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 5be8107e7758..5432c230c4cb 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -148,8 +148,8 @@ static struct zone_reclaim_stat *get_reclaim_stat(struct zone *zone,
148 return &zone->reclaim_stat; 148 return &zone->reclaim_stat;
149} 149}
150 150
151static unsigned long zone_nr_pages(struct zone *zone, struct scan_control *sc, 151static unsigned long zone_nr_lru_pages(struct zone *zone,
152 enum lru_list lru) 152 struct scan_control *sc, enum lru_list lru)
153{ 153{
154 if (!scanning_global_lru(sc)) 154 if (!scanning_global_lru(sc))
155 return mem_cgroup_zone_nr_pages(sc->mem_cgroup, zone, lru); 155 return mem_cgroup_zone_nr_pages(sc->mem_cgroup, zone, lru);
@@ -1489,10 +1489,10 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc,
1489 unsigned long ap, fp; 1489 unsigned long ap, fp;
1490 struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); 1490 struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);
1491 1491
1492 anon = zone_nr_pages(zone, sc, LRU_ACTIVE_ANON) + 1492 anon = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_ANON) +
1493 zone_nr_pages(zone, sc, LRU_INACTIVE_ANON); 1493 zone_nr_lru_pages(zone, sc, LRU_INACTIVE_ANON);
1494 file = zone_nr_pages(zone, sc, LRU_ACTIVE_FILE) + 1494 file = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_FILE) +
1495 zone_nr_pages(zone, sc, LRU_INACTIVE_FILE); 1495 zone_nr_lru_pages(zone, sc, LRU_INACTIVE_FILE);
1496 1496
1497 if (scanning_global_lru(sc)) { 1497 if (scanning_global_lru(sc)) {
1498 free = zone_page_state(zone, NR_FREE_PAGES); 1498 free = zone_page_state(zone, NR_FREE_PAGES);
@@ -1600,7 +1600,7 @@ static void shrink_zone(int priority, struct zone *zone,
1600 int file = is_file_lru(l); 1600 int file = is_file_lru(l);
1601 unsigned long scan; 1601 unsigned long scan;
1602 1602
1603 scan = zone_nr_pages(zone, sc, l); 1603 scan = zone_nr_lru_pages(zone, sc, l);
1604 if (priority || noswap) { 1604 if (priority || noswap) {
1605 scan >>= priority; 1605 scan >>= priority;
1606 scan = (scan * percent[file]) / 100; 1606 scan = (scan * percent[file]) / 100;