All of lore.kernel.org
 help / color / mirror / Atom feed
* + memcg-oom-clarify-some-oom-dump-messages.patch added to -mm tree
@ 2012-07-24 20:33 akpm
  2012-07-30 14:00   ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2012-07-24 20:33 UTC (permalink / raw)
  To: mm-commits; +Cc: handai.szj, gthelen, hannes, kamezawa.hiroyu, mhocko, rientjes


The patch titled
     Subject: memcg, oom: clarify some oom dump messages
has been added to the -mm tree.  Its filename is
     memcg-oom-clarify-some-oom-dump-messages.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Sha Zhengju <handai.szj@taobao.com>
Subject: memcg, oom: clarify some oom dump messages

Revise some oom dump messages to avoid misleading admin.

Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memcontrol.c |    2 +-
 mm/oom_kill.c   |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff -puN mm/memcontrol.c~memcg-oom-clarify-some-oom-dump-messages mm/memcontrol.c
--- a/mm/memcontrol.c~memcg-oom-clarify-some-oom-dump-messages
+++ a/mm/memcontrol.c
@@ -1472,7 +1472,7 @@ void mem_cgroup_print_oom_info(struct me
 	}
 	rcu_read_unlock();
 
-	printk(KERN_INFO "Task in %s killed", memcg_name);
+	printk(KERN_INFO "Task in %s will be killed", memcg_name);
 
 	rcu_read_lock();
 	ret = cgroup_path(mem_cgrp, memcg_name, PATH_MAX);
diff -puN mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages mm/oom_kill.c
--- a/mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages
+++ a/mm/oom_kill.c
@@ -472,7 +472,7 @@ void oom_kill_process(struct task_struct
 		dump_header(p, gfp_mask, order, memcg, nodemask);
 
 	task_lock(p);
-	pr_err("%s: Kill process %d (%s) score %d or sacrifice child\n",
+	pr_err("%s: Will kill process %d (%s) score %d or sacrifice child\n",
 		message, task_pid_nr(p), p->comm, points);
 	task_unlock(p);
 
@@ -509,6 +509,7 @@ void oom_kill_process(struct task_struct
 	if (!p) {
 		rcu_read_unlock();
 		put_task_struct(victim);
+		pr_err("No process has been killed!\n");
 		return;
 	} else if (victim != p) {
 		get_task_struct(p);
@@ -540,7 +541,7 @@ void oom_kill_process(struct task_struct
 				continue;
 
 			task_lock(p);	/* Protect ->comm from prctl() */
-			pr_err("Kill process %d (%s) sharing same memory\n",
+			pr_err("Killed process %d (%s) sharing same memory\n",
 				task_pid_nr(p), p->comm);
 			task_unlock(p);
 			do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true);
_
Subject: Subject: memcg, oom: clarify some oom dump messages

Patches currently in -mm which might be from handai.szj@taobao.com are

mm-oom-introduce-helper-function-to-process-threads-during-scan.patch
mm-memcg-introduce-own-oom-handler-to-iterate-only-over-its-own-threads.patch
memcg-oom-provide-more-info-while-memcg-oom-happening.patch
memcg-oom-clarify-some-oom-dump-messages.patch


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + memcg-oom-clarify-some-oom-dump-messages.patch added to -mm tree
  2012-07-24 20:33 + memcg-oom-clarify-some-oom-dump-messages.patch added to -mm tree akpm
@ 2012-07-30 14:00   ` Michal Hocko
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2012-07-30 14:00 UTC (permalink / raw)
  To: akpm
  Cc: mm-commits, handai.szj, gthelen, hannes, kamezawa.hiroyu,
	rientjes, LKML, linux-mm

On Tue 24-07-12 13:33:08, Andrew Morton wrote:
> 
> The patch titled
>      Subject: memcg, oom: clarify some oom dump messages
> has been added to the -mm tree.  Its filename is
>      memcg-oom-clarify-some-oom-dump-messages.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Sha Zhengju <handai.szj@taobao.com>
> Subject: memcg, oom: clarify some oom dump messages
> 
> Revise some oom dump messages to avoid misleading admin.

Not that I would care much, but does this make the messages really more
clear?
OOM killer just sends the signal and the task dies asynchronously so
saying that something has been killed is a bit misleading but I am
wondering it it really confuses anybody to make a wrong conclusion from
the message.

[...]
> diff -puN mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages mm/oom_kill.c
> --- a/mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages
> +++ a/mm/oom_kill.c
[...]
> @@ -509,6 +509,7 @@ void oom_kill_process(struct task_struct
>  	if (!p) {
>  		rcu_read_unlock();
>  		put_task_struct(victim);
> +		pr_err("No process has been killed!\n");

Is this even true? p existed few moments ago so it could have been
killed and exited in the mean time

>  		return;
>  	} else if (victim != p) {
>  		get_task_struct(p);
> @@ -540,7 +541,7 @@ void oom_kill_process(struct task_struct
>  				continue;
>  
>  			task_lock(p);	/* Protect ->comm from prctl() */
> -			pr_err("Kill process %d (%s) sharing same memory\n",
> +			pr_err("Killed process %d (%s) sharing same memory\n",
>  				task_pid_nr(p), p->comm);

technically it hasn't been killed yet because you are sending the signal
bellow.

>  			task_unlock(p);
>  			do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true);
> _
> Subject: Subject: memcg, oom: clarify some oom dump messages
> 
> Patches currently in -mm which might be from handai.szj@taobao.com are
> 
> mm-oom-introduce-helper-function-to-process-threads-during-scan.patch
> mm-memcg-introduce-own-oom-handler-to-iterate-only-over-its-own-threads.patch
> memcg-oom-provide-more-info-while-memcg-oom-happening.patch
> memcg-oom-clarify-some-oom-dump-messages.patch
> 

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + memcg-oom-clarify-some-oom-dump-messages.patch added to -mm tree
@ 2012-07-30 14:00   ` Michal Hocko
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2012-07-30 14:00 UTC (permalink / raw)
  To: akpm
  Cc: mm-commits, handai.szj, gthelen, hannes, kamezawa.hiroyu,
	rientjes, LKML, linux-mm

On Tue 24-07-12 13:33:08, Andrew Morton wrote:
> 
> The patch titled
>      Subject: memcg, oom: clarify some oom dump messages
> has been added to the -mm tree.  Its filename is
>      memcg-oom-clarify-some-oom-dump-messages.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Sha Zhengju <handai.szj@taobao.com>
> Subject: memcg, oom: clarify some oom dump messages
> 
> Revise some oom dump messages to avoid misleading admin.

Not that I would care much, but does this make the messages really more
clear?
OOM killer just sends the signal and the task dies asynchronously so
saying that something has been killed is a bit misleading but I am
wondering it it really confuses anybody to make a wrong conclusion from
the message.

[...]
> diff -puN mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages mm/oom_kill.c
> --- a/mm/oom_kill.c~memcg-oom-clarify-some-oom-dump-messages
> +++ a/mm/oom_kill.c
[...]
> @@ -509,6 +509,7 @@ void oom_kill_process(struct task_struct
>  	if (!p) {
>  		rcu_read_unlock();
>  		put_task_struct(victim);
> +		pr_err("No process has been killed!\n");

Is this even true? p existed few moments ago so it could have been
killed and exited in the mean time

>  		return;
>  	} else if (victim != p) {
>  		get_task_struct(p);
> @@ -540,7 +541,7 @@ void oom_kill_process(struct task_struct
>  				continue;
>  
>  			task_lock(p);	/* Protect ->comm from prctl() */
> -			pr_err("Kill process %d (%s) sharing same memory\n",
> +			pr_err("Killed process %d (%s) sharing same memory\n",
>  				task_pid_nr(p), p->comm);

technically it hasn't been killed yet because you are sending the signal
bellow.

>  			task_unlock(p);
>  			do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true);
> _
> Subject: Subject: memcg, oom: clarify some oom dump messages
> 
> Patches currently in -mm which might be from handai.szj@taobao.com are
> 
> mm-oom-introduce-helper-function-to-process-threads-during-scan.patch
> mm-memcg-introduce-own-oom-handler-to-iterate-only-over-its-own-threads.patch
> memcg-oom-provide-more-info-while-memcg-oom-happening.patch
> memcg-oom-clarify-some-oom-dump-messages.patch
> 

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-30 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-24 20:33 + memcg-oom-clarify-some-oom-dump-messages.patch added to -mm tree akpm
2012-07-30 14:00 ` Michal Hocko
2012-07-30 14:00   ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.