-
Nick Piggin authored
kswapd is still sometimes going into loops. The problem seemed to be happening on systems with zero inactive pages in ZONE_DMA, so pages_scanned could never be increased, all_unreclaimable would never be set, and kswapd would never break. So change pages_scanned to be a count of the number of _active_ list pages scanned rather than inactive. This has been reported to solve the problems. This is not subject to the reverse problem where one might have zero active list pages, because inactive pages are either be reclaimed, or put onto the active list. I think it is reasonable to have all_unreclaimed trigger based on the amount of active list scanning rather than inactive. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
dc05d09d