The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.9.6 ------> commit 99cfc19adbb3ad4de11d4fd708ec87f260591b50 Author: Andrey Ryabinin <aryabi...@virtuozzo.com> Date: Thu Nov 5 18:03:53 2015 +0400
ve/mm,oom: print information about ve of killed task dmesg |grep Killed Before: Killed process 14892 (trinity-c271) total-vm:97920kB, anon-rss:2508kB, file-rss:1060kB After: Killed process 14892 (trinity-c271) in ve 4 total-vm:97920kB, anon-rss:2508kB, file-rss:1060kB https://jira.sw.ru/browse/PSBM-40610 Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com> khorenko@: * s/ve/VE/g * put VE name into quotes --- mm/oom_kill.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 71d88ad5..76cc927 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -875,10 +875,13 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, /* mm cannot safely be dereferenced after task_unlock(victim) */ mm = victim->mm; mark_oom_victim(victim); - pr_err("Killed process %d (%s) total-vm:%lukB, anon-rss:%lukB, file-rss:%lukB\n", - task_pid_nr(victim), victim->comm, K(victim->mm->total_vm), + rcu_read_lock(); + pr_err("Killed process %d (%s) in VE \"%s\" total-vm:%lukB, anon-rss:%lukB, file-rss:%lukB\n", + task_pid_nr(victim), victim->comm, task_ve_name(victim), + K(victim->mm->total_vm), K(get_mm_counter(victim->mm, MM_ANONPAGES)), K(get_mm_counter(victim->mm, MM_FILEPAGES))); + rcu_read_unlock(); task_unlock(victim); /* @@ -898,8 +901,8 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, continue; task_lock(p); /* Protect ->comm from prctl() */ - pr_err("Kill process %d (%s) sharing same memory\n", - task_pid_nr(p), p->comm); + pr_err("Kill process %d (%s) in VE \"%s\" sharing same memory\n", + task_pid_nr(p), p->comm, task_ve_name(p)); task_unlock(p); do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true); mem_cgroup_note_oom_kill(memcg, p); _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel