Re: [PATCH v5 3.1.0-rc4-tip 0/26] Uprobes patchset with perfprobe support
From: Srikar Dronamraju
Date: Tue Sep 20 2011 - 10:34:57 EST
* Christoph Hellwig <hch@xxxxxxxxxxxxx> [2011-09-20 09:34:01]:
> On Tue, Sep 20, 2011 at 05:29:38PM +0530, Srikar Dronamraju wrote:
> > - Uses i_mutex instead of uprobes_mutex.
>
> What for exactly? I'm pretty strict against introducing even more
> uses for i_mutex, it's already way to overloaded with different
> meanings.
>
There could be multiple simultaneous requests for adding/removing a
probe for the same location i.e same inode + same offset. These requests
will have to be serialized.
To serialize this we had used uprobes specific mutex (uprobes_mutex) in
the last patchset. However using uprobes_mutex will mean we will be
serializing requests for unrelated files. I.e if we get a request to
probe libpthread while we are inserting/deleting a probe on libc,
then we used to make the libpthread request wait unnecessarily.
This also means that I dont need to introduce yet another lock.
After using i_mutex, these two requests can run in parallel.
I had proposed this while answering one of the comments in the last
patchset. Since I didnt hear any complaints, I went ahead and
implemented this.
I could use any other inode/file/mapping based sleepable lock that is of
higher order than mmap_sem. Can you please let me know if we have
alternatives.
--
Thanks and Regards
Srikar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/