[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [olpc-software] graceful handling of out-of-memory conditions

On 3/28/06, David Zeuthen <davidz redhat com> wrote:
> I guess I'm just trying to say that... by default processes should be
> protected from being nuked by the OOM killer in the kernel. When our
> shell launches an application such as Firefox or Abiword it should
> simply set a flag for that process such that the OOM killer in the

- any process on the system can be protected from the
OOM killer by using /proc/pid/oom_adj and setting it to -17

> kernel may nuke it. Child processes should inherit this flag of course.

- children currently inherit the oom disable flag.

> Hence, only apps that are not part of the "shell" may get nuked and this
> should be sufficient as we already verified (through QA and testing)
> that our shell isn't leaking.
> What about this simple low-tech solution? If it's not 100% stupid, I
> suppose the next question is 1) what kernel changes are necessary; and
> 2) can we expect the Linux kernel people to accept such a patch
> upstream?

- oom killer selects the pid to murder by picking the pid that has the
highest mem size ( mm->total_mm + (all of it's children's mem size/2))
- long running + if_niced. this sounds nice and intuitive to me.
- the core oom killer function is badness() here

I think the kernel already gives you the capability you request, right?

Best regards,
jaya kumar

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]