diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index ca64e3e0c518..412d7872fc75 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1413,16 +1413,13 @@ static unsigned long shrink_zone(int priority, struct zone *zone, | |||
1413 | if (scan_global_lru(sc)) { | 1413 | if (scan_global_lru(sc)) { |
1414 | int file = is_file_lru(l); | 1414 | int file = is_file_lru(l); |
1415 | int scan; | 1415 | int scan; |
1416 | /* | 1416 | |
1417 | * Add one to nr_to_scan just to make sure that the | ||
1418 | * kernel will slowly sift through each list. | ||
1419 | */ | ||
1420 | scan = zone_page_state(zone, NR_LRU_BASE + l); | 1417 | scan = zone_page_state(zone, NR_LRU_BASE + l); |
1421 | if (priority) { | 1418 | if (priority) { |
1422 | scan >>= priority; | 1419 | scan >>= priority; |
1423 | scan = (scan * percent[file]) / 100; | 1420 | scan = (scan * percent[file]) / 100; |
1424 | } | 1421 | } |
1425 | zone->lru[l].nr_scan += scan + 1; | 1422 | zone->lru[l].nr_scan += scan; |
1426 | nr[l] = zone->lru[l].nr_scan; | 1423 | nr[l] = zone->lru[l].nr_scan; |
1427 | if (nr[l] >= sc->swap_cluster_max) | 1424 | if (nr[l] >= sc->swap_cluster_max) |
1428 | zone->lru[l].nr_scan = 0; | 1425 | zone->lru[l].nr_scan = 0; |