Re: 2.6.10: kswapd spins like crazy

From: Nick Piggin
Date: Thu Feb 03 2005 - 20:29:15 EST


Nick Piggin wrote:

Hmm, your DMA zone has no active pages, and pages_scanned (which triggers all_unreclaimable)
is only incremented when scanning the active list. But I wonder, if the pages can't be
freed, why aren't they being put on the active list?

Oh, attached should be a minimal fix if you would like to try it out.


---

linux-2.6-npiggin/mm/vmscan.c | 1 +
1 files changed, 1 insertion(+)

diff -puN mm/vmscan.c~vmscan-minfix mm/vmscan.c
--- linux-2.6/mm/vmscan.c~vmscan-minfix 2005-02-04 11:52:37.000000000 +1100
+++ linux-2.6-npiggin/mm/vmscan.c 2005-02-04 11:53:32.000000000 +1100
@@ -575,6 +575,7 @@ static void shrink_cache(struct zone *zo
nr_taken++;
}
zone->nr_inactive -= nr_taken;
+ zone->pages_scanned += nr_scan;
spin_unlock_irq(&zone->lru_lock);

if (nr_taken == 0)

_