Messages in this thread | | | Date | Tue, 10 May 2011 16:41:44 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [PATCH 4/4] oom: don't kill random process |
| |
On Tue, 10 May 2011, KOSAKI Motohiro wrote:
> CAI Qian reported oom-killer killed all system daemons in his > system at first if he ran fork bomb as root. The problem is, > current logic give them bonus of 3% of system ram. Example, > he has 16GB machine, then root processes have ~500MB oom > immune. It bring us crazy bad result. _all_ processes have > oom-score=1 and then, oom killer ignore process memroy usage > and kill random process. This regression is caused by commit > a63d83f427 (oom: badness heuristic rewrite). > > This patch changes select_bad_process() slightly. If oom points == 1, > it's a sign that the system have only root privileged processes or > similar. Thus, select_bad_process() calculate oom badness without > root bonus and select eligible process. >
This second (and very costly) iteration is unnecessary if the range of oom scores is increased from 1000 to 10000 or 100000 as suggested in the previous patch.
| |