This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip 1/5] [CLEANUP] kprobes: Remove redundant text_mutex lock in optimize
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: Mathieu Desnoyers <mathieu dot desnoyers at efficios dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, Jason Baron <jbaron at redhat dot com>
- Date: Tue, 11 May 2010 16:06:53 -0400
- Subject: Re: [PATCH -tip 1/5] [CLEANUP] kprobes: Remove redundant text_mutex lock in optimize
- References: <20100510175313.27396.34605.stgit@localhost6.localdomain6> <20100510175320.27396.49896.stgit@localhost6.localdomain6> <20100511123550.GB25418@Krystal>
Hi Mathieu,
Mathieu Desnoyers wrote:
> * Masami Hiramatsu (mhiramat@redhat.com) wrote:
>> Remove text_mutex locking in optimize_all_kprobes, because
>> that function doesn't modify text but just order optimization
>> to worker.
>
> Hi Masami,
>
> A few comments:
>
> 1) optimize_all_kprobes/unoptimize_all_kprobes should have comments saying that
> they are always called with kprobe_mutex held.
>
> 2) The sentence above in the changelog could be changed into:
>
> ..."because this function doesn't modify text. It simply queues optimizations
> for the kprobe_optimizer worker thread."
>
> 3)
>
> static DEFINE_MUTEX(kprobe_mutex); /* Protects kprobe_table */
>
> .. should also state that it protects optimizing_list.
>
Thanks! all comments are good to me!
Thank you again,
--
Masami Hiramatsu
e-mail: mhiramat@redhat.com