Re: [RFC] [PATCH] To improve kretprobe scalability

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, May 21, 2008 - 4:32 pm

On Wed, 21 May 2008 06:32:17 +0530
Srinivasa D S <srinivasa@in.ibm.com> wrote:


Are you sure that all the code which was previously globally serialised
is safe to run concurrently?


That's a large speedup.

Do you have available the figures for the same workload when no probes
are set at all?


An array of 64 spinlocks.  These will all be crammed into two or four
cachelines.  If there is really any concurrency in here, the contention
will be large.

I suggest that you experiment with one-lock-per-cacheline here and see
whether it is worth doing that permanently.

Something along the lines of

static struct {
	spinlock_t lock __cacheline_aligned;
} kretprobe_locks[KPROBE_TABLE_SIZE];

static spinlock_t *kretprobe_lock_ptr(...)
{
	return kretprobe_locks + hash(...);
}


Also, none of this new code is needed on uniprocessor builds.  Did we
just add some bloat?


I think these functions are misnamed.  Generally functions whose names
are of the form get_foo() and put_foo() are used for acquiring and
releasing reference counts.  These functions don't do that.

kretprobe_hash_lock() and kretprobe_hash_unlock() would be better?


that's an open-coded copy of get_kretprobe_hash_lock()?


and of put_kretprobe_hash_lock().  Perhaps a separate function which
just obtains the spinlock_t* is needed.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] [PATCH] To improve kretprobe scalability, Srinivasa D S, (Tue May 20, 6:02 pm)
Re: [RFC] [PATCH] To improve kretprobe scalability, Andrew Morton, (Wed May 21, 4:32 pm)
Re: [RFC] [PATCH] To improve kretprobe scalability, Abhishek Sagar, (Thu May 22, 12:07 am)
Re: [RFC] [PATCH] To improve kretprobe scalability, Srinivasa D S, (Thu May 22, 1:26 am)
Re: [RFC] [PATCH] To improve kretprobe scalability, Srinivasa DS, (Thu May 22, 1:42 am)
Re: [RFC] [PATCH] To improve kretprobe scalability, Abhishek Sagar, (Thu May 22, 5:16 am)
Re: [RFC] [PATCH] To improve kretprobe scalability, Ananth N Mavinakayan ..., (Tue May 27, 1:22 am)