lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Feb 2012 11:55:47 -0700
From:	David Ahern <dsahern@...il.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	Luigi Semenzato <semenzato@...omium.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	Stephen Wilson <wilsons@...rt.ca>,
	Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...il.com>,
	Robert Richter <robert.richter@....com>,
	linux-kernel@...r.kernel.org, sonnyrao@...omium.org,
	olofj@...omium.org, eranian@...gle.com
Subject: Re: [PATCH] Perf: bug fix: distinguish between rename and exec

On 2/15/12 10:30 AM, Peter Zijlstra wrote:
> On Wed, 2012-02-15 at 09:57 -0700, David Ahern wrote:
>>
>> I'm not Acme, but I do care. We use a lot of processes with named
>> threads that give users an idea about the function of a particular
>> thread.
>>
> But why would they care? If you're debugging its easy enough to see from
> the backtrace and if you're not, most tools like top/ps don't even show
> threads (by default).
>
> So who cares what threads are called.
>
> I realize I'm not going to convince anybody, but I genuinely don't see
> the point of naming threads.

Very subjective. How fast do you want your users/tech 
staff/developers/QA testers to make sense of what is going on? Which is 
more informative (process and thread names sanitized)

$ top -d5

top - 18:39:49 up 23:46,  1 user,  load average: 0.75, 0.37, 0.24
Cpu(s): 11.0%us, 19.0%sy,  0.0%ni, 47.8%id,  0.0%wa,  0.3%hi, 21.8%si, 
0.0%st

   PID USER   S %CPU %MEM    TIME+  COMMAND
  3830 root   S 62.4  1.1   1:16.68 myapp


Wow, myapp is sucking up CPU. I wonder what it's doing. 'H'.


With non-named threads:

top - 18:40:36 up 23:47,  1 user,  load average: 0.89, 0.47, 0.28
Cpu(s): 15.5%us, 22.4%sy,  0.0%ni, 45.7%id,  0.0%wa,  0.6%hi, 15.9%si, 
0.0%st

   PID USER  S %CPU %MEM    TIME+  COMMAND
  3891 root  S 44.8  1.1   0:12.39 myapp
  3879 root  R 14.6  1.1   0:26.07 myapp
  3893 root  S  8.7  1.1   0:08.62 myapp

Ok, so 3 threads are dominating the CPU. I guess I need to hook up gdb 
to find out which functional areas those threads are running. Or, for 
one product I worked on you have to know that the thread map is dumped 
to a file, get shell access, read it and mentally correlate lwps.

Or you can name the threads:

top - 18:40:36 up 23:47,  1 user,  load average: 0.89, 0.47, 0.28
Cpu(s): 15.5%us, 22.4%sy,  0.0%ni, 45.7%id,  0.0%wa,  0.6%hi, 15.9%si, 
0.0%st

   PID USER  S %CPU %MEM    TIME+  COMMAND
  3891 root  S 44.8  1.1   0:12.39 myapp:dispatch
  3879 root  R 14.6  1.1   0:26.07 myapp:my-mgr
  3893 root  S  8.7  1.1   0:08.62 myapp:worker

Sure process knowledge is needed but top gives a lot more information 
for named threads.

Even with perf having named threads makes the event dumps 100x more 
understandable because the comm name gives you a hint about what the 
task is does.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ