Hi there. I've been following the OOM killer / kswapd issues with some interest for a while now. Granted, the situation is a lot better in the latest gentoo-dev-sources tree - especially in light of the inclusion of 1900_kswapd-pages-scanned-fix.patch ;) However, the situation doesn't end there. Thus far, I've been using Marcelo Tosatti's pageout-throttling patch to handle the still-errant OOM killer. But now it looks as though Rik van Riel has finally drawn a line under the affair by fixing a mistake he introduced a while ago. This appears to be the officially accepted fix as it's now in the 2.6.11-rc1 tree and I would be most grateful if the kernel team could seriously consider adding it (at least in gentoo-dev-sources) as it purports to fix the silly behaviour exhibited by the OOM killer. Note that I've recently used both Marcelo's and Rik's patch together (as does the latest hardended-dev-sources branch) but I'm assuming that Marcelo's patch is deprecated by Rik's because I can see no mention of it in the -rc1 ChangeLog (didn't check -bk though). Description follows: --- [PATCH] vmscan: count writeback pages in nr_scanned OOM kills have been observed with 70% of the pages in lowmem being in the writeback state. If we count those pages in sc->nr_scanned, the VM should throttle and wait for IO completion, instead of OOM killing. (akpm: this is how the code was designed to work - we broke it six months ago). Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Daniel, just FYI: Andrew Morton has released 2.6.11-rc1-mm1 and he's still keeping Marcelo's patch in his tree. In light of that, the patch probably still has merit so I'll let you know if it (and when) it happens to go mainline. Personally, I'll continue to use both until the fact of the matter is clear.
Fixed in gentoo-dev-sources-2.6.10-r5. Thanks for reporting.