diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 5fec1ba9951f..9c8222b499b4 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -174,7 +174,8 @@ static unsigned long zone_reclaimable_pages(struct zone *zone) | |||
174 | 174 | ||
175 | bool zone_reclaimable(struct zone *zone) | 175 | bool zone_reclaimable(struct zone *zone) |
176 | { | 176 | { |
177 | return zone->pages_scanned < zone_reclaimable_pages(zone) * 6; | 177 | return zone_page_state(zone, NR_PAGES_SCANNED) < |
178 | zone_reclaimable_pages(zone) * 6; | ||
178 | } | 179 | } |
179 | 180 | ||
180 | static unsigned long get_lru_size(struct lruvec *lruvec, enum lru_list lru) | 181 | static unsigned long get_lru_size(struct lruvec *lruvec, enum lru_list lru) |
@@ -1508,7 +1509,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec, | |||
1508 | __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, nr_taken); | 1509 | __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, nr_taken); |
1509 | 1510 | ||
1510 | if (global_reclaim(sc)) { | 1511 | if (global_reclaim(sc)) { |
1511 | zone->pages_scanned += nr_scanned; | 1512 | __mod_zone_page_state(zone, NR_PAGES_SCANNED, nr_scanned); |
1512 | if (current_is_kswapd()) | 1513 | if (current_is_kswapd()) |
1513 | __count_zone_vm_events(PGSCAN_KSWAPD, zone, nr_scanned); | 1514 | __count_zone_vm_events(PGSCAN_KSWAPD, zone, nr_scanned); |
1514 | else | 1515 | else |
@@ -1698,7 +1699,7 @@ static void shrink_active_list(unsigned long nr_to_scan, | |||
1698 | nr_taken = isolate_lru_pages(nr_to_scan, lruvec, &l_hold, | 1699 | nr_taken = isolate_lru_pages(nr_to_scan, lruvec, &l_hold, |
1699 | &nr_scanned, sc, isolate_mode, lru); | 1700 | &nr_scanned, sc, isolate_mode, lru); |
1700 | if (global_reclaim(sc)) | 1701 | if (global_reclaim(sc)) |
1701 | zone->pages_scanned += nr_scanned; | 1702 | __mod_zone_page_state(zone, NR_PAGES_SCANNED, nr_scanned); |
1702 | 1703 | ||
1703 | reclaim_stat->recent_scanned[file] += nr_taken; | 1704 | reclaim_stat->recent_scanned[file] += nr_taken; |
1704 | 1705 | ||