mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>,
	Steven Rostedt <srostedt@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: Don't use tracing_record_cmdline() in workqueue tracer
Date: Tue, 10 Mar 2009 13:11:25 +0100	[thread overview]
Message-ID: <20090310121125.GC5794@elte.hu> (raw)
In-Reply-To: <20090310090828.A46F.A69D9226@jp.fujitsu.com>


* KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > 
> > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > 
> > > Currently, /sys/kernel/debug/tracing/trace_stat/workqueues can 
> > > display wrong and strang thread name.
> > > 
> > > Why?
> > > 
> > > Currently, ftrace has 
> > > tracing_record_cmdline()/trace_find_cmdline() convinience 
> > > function. they implement task->comm string cache. it can avoid 
> > > unnecessary memcpy overhead. and workqueue tracer use it.
> > > 
> > > However, in general, any trace stastics feature shouldn't use 
> > > tracing_record_cmdline(). A trace stastics can display very 
> > > old process. then comm cache can return wrong string because 
> > > recent process override the cache.
> > > 
> > > Fortunately, workqueue trace gerantee to live displayed 
> > > process. Then, we can search comm string from pid at display 
> > > time.
> > 
> > Applied, thanks!
> > 
> > We might need to improve the comm-cache - i've seen frequent 
> > artifacts due to it. Displaying <...> is _far_ better than an 
> > outright misleading string displayed.
> > 
> > I.e. the cache should be improved to be properly coherent with 
> > reality.
> > 
> > 	Ingo
> 
> Doh!
> My last mail's cc list didn't include lkml. that's unintensional silly 
> my mistake. very sorry.
> 
> and Yes, memcpy(buf, task->comm, 16) mean two movq 
> instruction. that is worthless for caching. I think we can 
> remove this cache completely.

ok, agreed - mind sending a patch for that?

> and, I find my last patch has one race window. fixing below.

Could you please send a delta patch against tip:master? Thanks,

	Ingo

  reply	other threads:[~2009-03-10 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090309175330.CF63.A69D9226@jp.fujitsu.com>
     [not found] ` <20090309092817.GA2184@elte.hu>
2009-03-10  0:57   ` KOSAKI Motohiro
2009-03-10 12:11     ` Ingo Molnar [this message]
2009-03-10 12:18       ` KOSAKI Motohiro

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=20090310121125.GC5794@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srostedt@redhat.com \
    /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

all inboxes | Powered by JetHome®