[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] [PATCH] To improve kretprobe scalability
Abhishek Sagar wrote:
> On 5/21/08, Srinivasa D S <> 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

Srinivasa DS

 \ /
  Last update: 2008-05-22 10:45    [W:0.056 / U:25.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site