Commit 0b217676 authored by Vincent Li's avatar Vincent Li Committed by Linus Torvalds

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: default avatarVincent 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2c85f51d
...@@ -148,8 +148,8 @@ static struct zone_reclaim_stat *get_reclaim_stat(struct zone *zone, ...@@ -148,8 +148,8 @@ static struct zone_reclaim_stat *get_reclaim_stat(struct zone *zone,
return &zone->reclaim_stat; return &zone->reclaim_stat;
} }
static unsigned long zone_nr_pages(struct zone *zone, struct scan_control *sc, static unsigned long zone_nr_lru_pages(struct zone *zone,
enum lru_list lru) struct scan_control *sc, enum lru_list lru)
{ {
if (!scanning_global_lru(sc)) if (!scanning_global_lru(sc))
return mem_cgroup_zone_nr_pages(sc->mem_cgroup, zone, lru); 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,10 +1489,10 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc,
unsigned long ap, fp; unsigned long ap, fp;
struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);
anon = zone_nr_pages(zone, sc, LRU_ACTIVE_ANON) + anon = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_ANON) +
zone_nr_pages(zone, sc, LRU_INACTIVE_ANON); zone_nr_lru_pages(zone, sc, LRU_INACTIVE_ANON);
file = zone_nr_pages(zone, sc, LRU_ACTIVE_FILE) + file = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_FILE) +
zone_nr_pages(zone, sc, LRU_INACTIVE_FILE); zone_nr_lru_pages(zone, sc, LRU_INACTIVE_FILE);
if (scanning_global_lru(sc)) { if (scanning_global_lru(sc)) {
free = zone_page_state(zone, NR_FREE_PAGES); free = zone_page_state(zone, NR_FREE_PAGES);
...@@ -1600,7 +1600,7 @@ static void shrink_zone(int priority, struct zone *zone, ...@@ -1600,7 +1600,7 @@ static void shrink_zone(int priority, struct zone *zone,
int file = is_file_lru(l); int file = is_file_lru(l);
unsigned long scan; unsigned long scan;
scan = zone_nr_pages(zone, sc, l); scan = zone_nr_lru_pages(zone, sc, l);
if (priority || noswap) { if (priority || noswap) {
scan >>= priority; scan >>= priority;
scan = (scan * percent[file]) / 100; scan = (scan * percent[file]) / 100;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment