Skip to contentSkip to conversation

Linux killed Kenny, bastard!

DISCUSSION Tomasz Chmielewski 3 participants 5 messages Jan 13, 2009

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines
Quoted 7 lines · Evgeniy Polyakov
Quoted 5 lines

Like anything that spawns a thread or process per request/client, or preallocates set of them which connect to the huge object like database. Most of the time database/server is killed first instead of comparably small clients.

Quoted 6 lines
Quoted 1 line

No, the reverse is true: when a task is chosen for oom kill based on the badness heuristic, the oom killer first attempts to kill any child task that isn't attached to the same mm. If the child shares an mm, both tasks must die before memory freeing can occur.

It is a theory, not a practice. OOM-killer most of time starts from ssh, database and lighttpd on the tested machines, when it could start in the reverse order and do not touch ssh at all. Better not from daemon itself, but its fastcgi spawned processes.

How does this feature relate to:

config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
default N
---help---
Register processes to be killed when memory is low

available in Staging drivers / Android?

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#1 lore raw

ANDROID low memory killer register (was Linux killed Kenny, bastard!)

Quoted 7 lines

config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
default N
---help---
Register processes to be killed when memory is low

available in Staging drivers / Android?

I believe they are related in the sense that both of them are unneccessary and should not make the final kernel...

The /proc../oom_adj interface is again sufficient for this.

#2 lore raw

Re: ANDROID low memory killer register (was Linux killed Kenny, bastard!)

Quoted 4 lines · Alan Cox

I believe they are related in the sense that both of them are unneccessary and should not make the final kernel...

The /proc../oom_adj interface is again sufficient for this.

Besides the fact that it will unlikely to work the way you expect, since oom adjustment is racy and may be too late, or not happend at all...

Alan, please try to apply this to practice and then you will suddenly find that it would be really great to have a different method, which will just work.

Signature · 1 line
	Evgeniy Polyakov
#3 lore raw

Re: ANDROID low memory killer register (was Linux killed Kenny, bastard!)

Quoted 8 lines · On Tue, 13 Jan 2009 15:23:56 +0300 Evgeniy Polyakov <[email protected]> wrote:
Quoted 4 lines · Alan Cox

I believe they are related in the sense that both of them are unneccessary and should not make the final kernel...

The /proc../oom_adj interface is again sufficient for this.

Besides the fact that it will unlikely to work the way you expect, since oom adjustment is racy and may be too late, or not happend at all...

I would love to see a proposal that met such criteria. I don't think I ever will and your random name based hack isn't it. The closest we have right now is the container stuff.

Alan

#4 lore raw
In reply to Tomasz Chmielewski
Quoted 7 lines · Tomasz Chmielewski

config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
default N
---help---
Register processes to be killed when memory is low

available in Staging drivers / Android?

It looks very similar to vanilla process selection to be killed, but it gets into account only rss size before the oom parameters.

Signature · 1 line
	Evgeniy Polyakov