Commit a39bc02e authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] Fix kswapd spinning

When a zone (usually DMA) has no active pages, pages_scanned (which
triggers all_unreclaimable) is only incremented when scanning the active
list. 

Make sure it's incremented for scanned cache entries too.
Tested-by: default avatarTerje Fåberg <terje_fb@yahoo.no>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a6868510
...@@ -575,6 +575,7 @@ static void shrink_cache(struct zone *zone, struct scan_control *sc) ...@@ -575,6 +575,7 @@ static void shrink_cache(struct zone *zone, struct scan_control *sc)
nr_taken++; nr_taken++;
} }
zone->nr_inactive -= nr_taken; zone->nr_inactive -= nr_taken;
zone->pages_scanned += nr_scan;
spin_unlock_irq(&zone->lru_lock); spin_unlock_irq(&zone->lru_lock);
if (nr_taken == 0) if (nr_taken == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment