lkml.org 
[lkml]   [2011]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to find a task through name faster?
On 07/11/2011 11:57 AM, loody wrote:
> 2011/7/12 Chris Friesen<chris.friesen@genband.com>:

>> The names of tasks isn't indexed in any way so the above is about as good as
>> it gets if that's all the information you have.
>
> actually, I only have the name for searching, since the thread start
> and finish periodically, pid of it will change dynamically. If I save
> the pid, next time it will change and be no use to me

If this is critical to your system performance you could customize the
kernel to do some sort of indexing based on the name. This would
involve a bit more work on task startup/shutdown and when the name is
changed, but it would make it faster to search for a task by name.

Chris

--
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com


\
 
 \ /
  Last update: 2011-07-11 21:59    [W:0.337 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site