Re: [PATCH] oom: create a resource limit for oom_adj

From: KOSAKI Motohiro
Date: Sun Nov 14 2010 - 00:08:11 EST


> > Hmm, at first glance that seems potentially dangerous if the current tab
> > generates a burt of memory allocations and it ends up killing all other
> > tabs before finally targeting the culprit whereas currently the heuristic
> > should do a good job of finding this problematic tab and killing it
> > instantly.
>
> The original oom_adj design would e.g. adjust all background tabs to seem
> twice as bad as the current tab, so a ever-growing current tab would
> only be able to get one or two tabs killed in the worst case:
>
> System is near OOM while the current tab starts using a normal amount of
> mem and grows beyond limits. After it easily killed the first bg tab by
> allocating one byte, it needs to grow to twice the normal tab memsize to
> start the OOM killer again. By then, it's score will be equal to normal
> background tabs (half size, double score), and killing the second tab will
> be luck. Killing the third tab should be impossible.
>
> (If you adjust the bg tabs to be four times as killable, you'll get what
> you asked for.)

Sorry for the delay.

I've sent revert patch to linus. We DON'T want to break any userland seriously.
So, we reconsider about this area. personally I hope to reintroduce oom_score_adj
later, but It must don't break current userland.



--
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/