Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77764 - Patch from Rik van Riel to fix OOM killer once and for all
Summary: Patch from Rik van Riel to fix OOM killer once and for all
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL: http://tocharian.ath.cx/hardened/hard...
Whiteboard: 2.6.10-2005.0
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-01-12 17:26 UTC by kfm
Modified: 2005-01-15 15:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2005-01-12 17:26:08 UTC
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>
Comment 1 kfm 2005-01-14 02:59:03 UTC
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.
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2005-01-15 15:54:20 UTC
Fixed in gentoo-dev-sources-2.6.10-r5. Thanks for reporting.