]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - mm/vmscan.c
mm, vmscan: have kswapd only scan based on the highest requested zone
[people/arne_f/kernel.git] / mm / vmscan.c
index 766b36bec829b85f105df9c54911c4864edee6be..c6e61dae382bd93de003b687e1b3725807144bc2 100644 (file)
@@ -3209,11 +3209,8 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
 
                sc.nr_reclaimed = 0;
 
-               /*
-                * Scan in the highmem->dma direction for the highest
-                * zone which needs scanning
-                */
-               for (i = pgdat->nr_zones - 1; i >= 0; i--) {
+               /* Scan from the highest requested zone to dma */
+               for (i = classzone_idx; i >= 0; i--) {
                        struct zone *zone = pgdat->node_zones + i;
 
                        if (!populated_zone(zone))