Re: [PATCH] fix spurious OOM kills
From: Andrea Arcangeli
Date: Sun Nov 14 2004 - 12:13:28 EST
On Sun, Nov 14, 2004 at 08:02:27AM -0200, Marcelo Tosatti wrote:
> Take zone->all_unreclaimable into account when you move oom_kill in page_alloc.c,
> which I now think might be the simpler fix.
> shrink_caches() will fail early due to all_unreclaimable() logic (it wont
> scan/writeout at lower priorities):
> if (zone->all_unreclaimable && sc->priority != DEF_PRIORITY)
> continue; /* Let kswapd poll it */
> I disabled all_unreclaimable after 5 seconds allowed kswapd to scan
> the full zone and reliably detect OOM in my kill-from-kswapd patch -
> you might want something similar.
> That seems one the main reasons for the spurious OOM kills.
> Anxious to see your patch!
could you make a patch for the above part? I agree likely we've to work
on the shrink_cache stuff to fix it.
Your patch does many things, some of which I believe it's wrong, but you
can split it, and take care of the above part so Chris can test it in
the meantime. In the spare time of the weekend I'm trying not to do
linux coding since I've to code for a private project that has to keep
going, so I'll move the oom killing in page_alloc.c only tomorrow (it
won't take very long to do it at it will at last fix one strict bug,
that your patch didn't fix competely and it'll avoid the complexity of
message passing to do it).
But today you can already post your change for the above sc->priority !=
DEF_PRIORITY if you think it's correct, I don't see why you need to wait
for my patch before posting it (they're pretty orthogonal, I didn't mean
to change shrink_cache at all but just to fixup and serialize the oom
invocation by moving it in page_alloc.c).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/