public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srinivasa DS <srinivasa@in.ibm.com>
To: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Ananth Mavinakayanahalli <ananth@in.ibm.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Subject: Re: [RFC] [PATCH] To improve kretprobe scalability
Date: Thu, 22 May 2008 14:12:02 +0530	[thread overview]
Message-ID: <483531DA.8030203@in.ibm.com> (raw)
In-Reply-To: <863e9df20805220007r36089c93p6f2a787818aa150c@mail.gmail.com>

Abhishek Sagar wrote:
> On 5/21/08, Srinivasa D S <srinivasa@in.ibm.com> wrote:
>>  Solution:
>>    1) Instead of having one global lock to protect kretprobe instances
>>  present in kretprobe object and kretprobe hash table. We will have two locks,
>>  one lock for protecting kretprobe hash table and another lock for kretporbe
>>  object.
> 
> Is it possible to get rid of the kretprobe hash table itself and lose
> the kretprobe_lock? It seems like it is just doing a pid-to-instance
> mapping. These return instances could be queued in the "current"
> task_struct in a LIFO manner. Mutation to this per-task list can be
> done with local irqs off...
> 

There were ideas of storing kretprobe instances in task_struct to get 
rid of locking, but that would require extending task_struct and 
catching each task exit, destroying its kretprobe instances. This makes 
code more invasive.
But in this implementation (global hash table, hashed by task), we
lock only the current task's hash bucket and hence we have fairly low 
contention.

Thanks
  Srinivasa DS

  reply	other threads:[~2008-05-22  8:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21  1:02 [RFC] [PATCH] To improve kretprobe scalability Srinivasa D S
2008-05-21 23:32 ` Andrew Morton
2008-05-22  8:26   ` Srinivasa D S
2008-05-27  8:22     ` Ananth N Mavinakayanahalli
2008-05-22  7:07 ` Abhishek Sagar
2008-05-22  8:42   ` Srinivasa DS [this message]
2008-05-22 12:16     ` Abhishek Sagar

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=483531DA.8030203@in.ibm.com \
    --to=srinivasa@in.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=sagar.abhishek@gmail.com \
    --cc=srikar@linux.vnet.ibm.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