Off-by-one in balance_pgdat(): `priority' can never go negative. It causes the scanning priority thresholds to be quite wrong and kswapd tends to go berzerk when there is a lot of mapped memory around. mm/vmscan.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN mm/vmscan.c~zone-pressure-fixes mm/vmscan.c --- 25/mm/vmscan.c~zone-pressure-fixes 2003-08-28 22:59:09.000000000 -0700 +++ 25-akpm/mm/vmscan.c 2003-08-28 22:59:40.000000000 -0700 @@ -989,7 +989,7 @@ static int balance_pgdat(pg_data_t *pgda if (to_free > 0) blk_congestion_wait(WRITE, HZ/10); } - if (priority < 0) { + if (priority <= 0) { for (i = 0; i < pgdat->nr_zones; i++) { struct zone *zone = pgdat->node_zones + i; _