All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@genband.com>
To: loody <miloody@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: how to find a task through name faster?
Date: Mon, 11 Jul 2011 13:55:48 -0600	[thread overview]
Message-ID: <4E1B5544.5000207@genband.com> (raw)
In-Reply-To: <CANudz+vvXrw=4+tk6z8GW+2rW-ZsogN0XGcozLSyY-dJ_SoHdw@mail.gmail.com>

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

  parent reply	other threads:[~2011-07-11 19:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANudz+sqkachOT7r9=-rc98nCEO_QOCx7KiBi5=NWaj5exmEPA@mail.gmail.com>
2011-07-11 16:52 ` how to find a task through name faster? loody
2011-07-11 17:51   ` Chris Friesen
2011-07-11 17:57     ` loody
2011-07-11 18:23       ` Muthu Kumar
2011-07-11 19:39         ` loody
2011-07-11 19:55       ` Chris Friesen [this message]
2011-07-11 20:16   ` Jiri Slaby
2011-07-13  7:55     ` loody
2011-07-13  9:21       ` Jiri Slaby

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=4E1B5544.5000207@genband.com \
    --to=chris.friesen@genband.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miloody@gmail.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 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.