Skip to content

Was: oom: prevent unnecessary oom kills or kernel panics

Oleg Nesterov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1oom_kill_task: mark every thread as TIF_MEMDIEmm/oom_kill.c+13 -41 reply
1/1select_bad_process: improve the PF_EXITING checkmm/oom_kill.c+16 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Was: oom: prevent unnecessary oom kills or kernel panics
Quoted 9 lines · Oleg Nesterov
Quoted 7 lines · David Rientjes
Quoted 4 lines · Oleg Nesterov
Quoted 3 lines

Using for_each_process() does not consider threads that have failed to exit after the oom killed parent and, thus, we select another innocent task to kill when we're really just waiting for those threads to exit

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

How so? select_bad_process() checks TIF_MEMDIE and returns ERR_PTR() if it is set.

TIF_MEMDIE is quite obviously a per-thread flag

Yes, and this is why I think it should be replaced.

But this is not simple. I'd suggest this patch as the first step.

It is not tested. I do not pretend I really understand oom-killer in all details (although oom_kill.c itself is quite trivial).

The patch assumes that

oom-prevent-unnecessary-oom-kills-or-kernel-panics.patch oom-skip-zombies-when-iterating-tasklist.patch

are dropped.

I think, this patch __might__ address the problems described in the changelog, but of course I am not sure.

I am relying on your and Kosaki's review, if you disagree with this change I won't argue.

But the current usage of TIF_MEMDIE can't be right.

Oleg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>