From: David Rientjes <rientjes@google.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v4] oom: add trace points for debugging.
Date: Thu, 15 Dec 2011 00:55:44 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.1112150055010.10848@chino.kir.corp.google.com> (raw)
In-Reply-To: <20111213181225.673e19db.kamezawa.hiroyu@jp.fujitsu.com>
On Tue, 13 Dec 2011, KAMEZAWA Hiroyuki wrote:
> Subject: [PATCH] tracepoint: add tracepoints for debugging oom_score_adj.
>
> oom_score_adj is used for guarding processes from OOM-Killer. One of problem
> is that it's inherited at fork(). When a daemon set oom_score_adj and
> make children, it's hard to know where the value is set.
>
> This patch adds some tracepoints useful for debugging. This patch adds
> 3 trace points.
> - creating new task
> - renaming a task (exec)
> - set oom_score_adj
>
> To debug, users need to enable some trace pointer. Maybe filtering is useful as
>
> # EVENT=/sys/kernel/debug/tracing/events/task/
> # echo "oom_score_adj != 0" > $EVENT/task_newtask/filter
> # echo "oom_score_adj != 0" > $EVENT/task_rename/filter
> # echo 1 > $EVENT/enable
> # EVENT=/sys/kernel/debug/tracing/events/oom/
> # echo 1 > $EVENT/enable
>
> output will be like this.
> # grep oom /sys/kernel/debug/tracing/trace
> bash-7699 [007] d..3 5140.744510: oom_score_adj_update: pid=7699 comm=bash oom_score_adj=-1000
> bash-7699 [007] ...1 5151.818022: task_newtask: pid=7729 comm=bash clone_flags=1200011 oom_score_adj=-1000
> ls-7729 [003] ...2 5151.818504: task_rename: pid=7729 oldcomm=bash newcomm=ls oom_score_adj=-1000
> bash-7699 [002] ...1 5175.701468: task_newtask: pid=7730 comm=bash clone_flags=1200011 oom_score_adj=-1000
> grep-7730 [007] ...2 5175.701993: task_rename: pid=7730 oldcomm=bash newcomm=grep oom_score_adj=-1000
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Thanks for being persistant with this!
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-12-15 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 9:12 KAMEZAWA Hiroyuki
2011-12-13 22:58 ` Andrew Morton
2011-12-13 23:52 ` KAMEZAWA Hiroyuki
2011-12-15 8:55 ` David Rientjes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1112150055010.10848@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox