All of lore.kernel.org
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: john stultz <johnstul@us.ibm.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Sean Foley <Sean_Foley@ca.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Darren Hart <dvhltc@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Mike Fulton <fultonm@ca.ibm.com>
Subject: Re: [RFC][PATCH] Add prctl to set sibling thread names
Date: Wed, 11 Nov 2009 09:04:47 +0900 (JST)	[thread overview]
Message-ID: <20091111090141.FD2A.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <1257884209.3139.17.camel@localhost>

> On Tue, 2009-11-10 at 14:27 +0900, KOSAKI Motohiro wrote:
> > Hi Sean, John,
> > 
> > > Kosaki,
> > > Here are a couple of use cases previously posted to this thread on the linux kernel mailing list:
> > > 
> > > dispatch thread adds context to thread names:
> > > http://marc.info/?l=linux-kernel&m=125660141231348&w=2
> > > 
> > > java language support:
> > > http://marc.info/?l=linux-kernel&m=125666430720863&w=2
> > > 
> > > 
> > > 
> > > Here are some various specific use cases from the web:
> > > 
> > > Attaching additional info to thread names when used for different purposes:
> > > http://osdir.com/ml/java.jsr.166-concurrency/2006-12/msg00105.html
> > > 
> > > Threads obtained from thread pools being reassigned new names:
> > > http://haacked.com/archive/2004/06/07/546.aspx
> > > http://bytes.com/topic/c-sharp/answers/637152-naming-backgroundworker-thread
> > > 
> > > Renaming threads scattered across third-party libraries by enumerating them and renaming them dynamically:
> > > http://stackoverflow.com/questions/467224/renaming-threads-in-java
> > 
> > Okey, good explanation. thanks!
> > 
> > So, I would suggested to extend /proc/{pid}/cmdline instead using task->comm.
> > because 
> >   - task->comm has nasty locking rule. It is harder to change SMP safe.
> 
> I cc'ed you on the updated patch which addresses this. Please let me
> know if you have specific concerns there.
> 
> >   - ps (and other procps tools) already support /proc/{pid}/cmdline.
> >   - task->comm is restrected 16 character length, /proc/cmdline isn't.
> 
> Part of the reason to use comm is that most tools like perf or oprofile,
> use comm, instead of cmd. 

Ah, good reason. Okey, I will revew your new patch.

thanks.


> Additionally, looking at cmdline, that's per
> mm not per task, right? So it wouldn't really work for thread names. 

Currently, yes. I meaned I think you can enhance it ;)

> Please correct me if I'm not seeing what you're really suggesting.




  reply	other threads:[~2009-11-11  0:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 23:21 [RFC][PATCH] Add prctl to set sibling thread names john stultz
2009-10-22  0:28 ` Andi Kleen
2009-10-22  0:42   ` john stultz
2009-10-22  0:44     ` Andi Kleen
2009-10-22  0:48 ` Arjan van de Ven
2009-10-22  0:49   ` Andi Kleen
2009-10-22  2:48     ` Arjan van de Ven
2009-10-24  3:54       ` Andi Kleen
2009-10-26 23:56         ` john stultz
2009-10-22  0:52   ` john stultz
2009-10-22  2:00     ` Andrew Morton
2009-11-05  2:26       ` KOSAKI Motohiro
2009-11-05  5:17         ` Darren Hart
2009-11-05  5:22           ` KOSAKI Motohiro
2009-11-05  5:36             ` Darren Hart
2009-11-05  5:42               ` KOSAKI Motohiro
2009-11-05 19:11                 ` john stultz
     [not found]                 ` <OF5EE04242.D2B67AF2-ON85257665.0064683D-85257665.0068209E@ca.ibm.com>
2009-11-10  5:27                   ` KOSAKI Motohiro
2009-11-10 20:16                     ` john stultz
2009-11-11  0:04                       ` KOSAKI Motohiro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-11-05 19:03 Sean Foley

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=20091111090141.FD2A.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=Sean_Foley@ca.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=dvhltc@us.ibm.com \
    --cc=fultonm@ca.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.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 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.