mm, oom: show process exiting information in __oom_kill_process()
Subsystems (2)
PATCH v2 1/1 mm, oom: show process exiting information in __oom_kill_process()
When the OOM killer finding a victim and trying to kill it, if the victim is already exiting, the task mm will be NULL and no process will be killed. But the dump_header() has been already executed, so it will be strange to dump so many information without killing a process. We'd better show some helpful information to indicate why this happens.
---
v1 -> v2:
- improve the output, per Tetsuo and Michal
--- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+)
mm/oom_kill.c +2 -0
@@ -863,6 +863,8 @@ static void __oom_kill_process(struct task_struct *victim, const char *message) p =find_lock_task_mm (victim);if (!p) { +pr_info ("%s: OOM victim %d (%s) is already exiting. Skip killing the task\n" , + message,task_pid_nr (victim), victim->comm);put_task_struct (victim);return ; }else if (victim != p) {
Signature · 1 line
2.18.1
Quoted 11 lines · Yafang Shao
When the OOM killer finding a victim and trying to kill it, if the victim is already exiting, the task mm will be NULL and no process will be killed. But the
dump_header()has been already executed, so it will be strange to dump so many information without killing a process. We'd better show some helpful information to indicate why this happens.Suggested-by David Rientjes <[email protected]>Signed-off-by Yafang Shao <[email protected]>Cc Michal Hocko <[email protected]>Cc Tetsuo Handa <[email protected]>Cc Qian Cai <[email protected]>
Thanks!
Quoted 22 lines
---
v1 -> v2:
- improve the output, per Tetsuo and Michal--- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+)mm/oom_kill.c +2
-0@@ -863,6 +863,8 @@ static void __oom_kill_process(struct task_struct *victim, const char *message) p =find_lock_task_mm (victim);if (!p) { +pr_info ("%s: OOM victim %d (%s) is already exiting. Skip killing the task\n" , + message,task_pid_nr (victim), victim->comm);put_task_struct (victim);return ; }else if (victim != p) {Signature · 1 line
2.18.1
Signature · 2 lines
Michal Hocko SUSE Labs