balance_pgdat(): where is total_scanned ever updated?
Subsystems (3)
Quoted 2 lines · Andrew Morton
I'm leaving this alone until it can be demonstrated that fixing it improves kernel behaviour in some manner.
How about applying this patch so nobody else will be confused?
mm/vmscan.c 2004-11-06 23:13:02.636826752 -0500 renamed from mm/vmscan.c 2004-11-06 23:02:48.691160680 -0500 +6 -2
@@ -1071,10 +1071,13 @@ /* * If we've done a decent amount of scanning and * the reclaim ratio is low, start doing writepage - * even in laptop mode + * even in laptop mode. + * NOTE: total_scanned is always zero; this code + * does nothing. Reactivating it has not been + * shown to be helpful at the moment. */ if (total_scanned > SWAP_CLUSTER_MAX * 2 && - total_scanned > total_reclaimed+total_reclaimed/2) + total_scanned > total_reclaimed + total_reclaimed / 2) sc.may_writepage = 1; } if (nr_pages && to_free > total_reclaimed)
@@ -1084,6 +1087,7 @@ /* * OK, kswapd is getting into trouble. Take a nap, then take * another pass across the zones. + * NOTE: total_scanned is always zero. See above. */ if (total_scanned && priority < DEF_PRIORITY - 2) blk_congestion_wait(WRITE, HZ/10);
--Chuck Ebbert 06-Nov-04 23:35:37