aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index d86a91f8c16b..75c29974e878 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1072,6 +1072,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1072 unsigned long nr_active; 1072 unsigned long nr_active;
1073 unsigned int count[NR_LRU_LISTS] = { 0, }; 1073 unsigned int count[NR_LRU_LISTS] = { 0, };
1074 int mode = lumpy_reclaim ? ISOLATE_BOTH : ISOLATE_INACTIVE; 1074 int mode = lumpy_reclaim ? ISOLATE_BOTH : ISOLATE_INACTIVE;
1075 unsigned long nr_anon;
1076 unsigned long nr_file;
1075 1077
1076 nr_taken = sc->isolate_pages(sc->swap_cluster_max, 1078 nr_taken = sc->isolate_pages(sc->swap_cluster_max,
1077 &page_list, &nr_scan, sc->order, mode, 1079 &page_list, &nr_scan, sc->order, mode,
@@ -1102,6 +1104,10 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1102 __mod_zone_page_state(zone, NR_INACTIVE_ANON, 1104 __mod_zone_page_state(zone, NR_INACTIVE_ANON,
1103 -count[LRU_INACTIVE_ANON]); 1105 -count[LRU_INACTIVE_ANON]);
1104 1106
1107 nr_anon = count[LRU_ACTIVE_ANON] + count[LRU_INACTIVE_ANON];
1108 nr_file = count[LRU_ACTIVE_FILE] + count[LRU_INACTIVE_FILE];
1109 __mod_zone_page_state(zone, NR_ISOLATED_ANON, nr_anon);
1110 __mod_zone_page_state(zone, NR_ISOLATED_FILE, nr_file);
1105 1111
1106 reclaim_stat->recent_scanned[0] += count[LRU_INACTIVE_ANON]; 1112 reclaim_stat->recent_scanned[0] += count[LRU_INACTIVE_ANON];
1107 reclaim_stat->recent_scanned[0] += count[LRU_ACTIVE_ANON]; 1113 reclaim_stat->recent_scanned[0] += count[LRU_ACTIVE_ANON];
@@ -1169,6 +1175,9 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1169 spin_lock_irq(&zone->lru_lock); 1175 spin_lock_irq(&zone->lru_lock);
1170 } 1176 }
1171 } 1177 }
1178 __mod_zone_page_state(zone, NR_ISOLATED_ANON, -nr_anon);
1179 __mod_zone_page_state(zone, NR_ISOLATED_FILE, -nr_file);
1180
1172 } while (nr_scanned < max_scan); 1181 } while (nr_scanned < max_scan);
1173 1182
1174done: 1183done:
@@ -1279,6 +1288,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1279 __mod_zone_page_state(zone, NR_ACTIVE_FILE, -nr_taken); 1288 __mod_zone_page_state(zone, NR_ACTIVE_FILE, -nr_taken);
1280 else 1289 else
1281 __mod_zone_page_state(zone, NR_ACTIVE_ANON, -nr_taken); 1290 __mod_zone_page_state(zone, NR_ACTIVE_ANON, -nr_taken);
1291 __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, nr_taken);
1282 spin_unlock_irq(&zone->lru_lock); 1292 spin_unlock_irq(&zone->lru_lock);
1283 1293
1284 while (!list_empty(&l_hold)) { 1294 while (!list_empty(&l_hold)) {
@@ -1329,7 +1339,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1329 LRU_ACTIVE + file * LRU_FILE); 1339 LRU_ACTIVE + file * LRU_FILE);
1330 move_active_pages_to_lru(zone, &l_inactive, 1340 move_active_pages_to_lru(zone, &l_inactive,
1331 LRU_BASE + file * LRU_FILE); 1341 LRU_BASE + file * LRU_FILE);
1332 1342 __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken);
1333 spin_unlock_irq(&zone->lru_lock); 1343 spin_unlock_irq(&zone->lru_lock);
1334} 1344}
1335 1345