From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Peter Zijlstra <peterz@infradead.org>,
tglx@linutronix.de
Subject: Re: [RFC PATCH][3.0] Tracepoint: dissociate from module mutex
Date: Wed, 10 Aug 2011 15:16:27 -0400 [thread overview]
Message-ID: <20110810191627.GA8525@Krystal> (raw)
In-Reply-To: <20110810180522.GB2988@redhat.com>
* Jason Baron (jbaron@redhat.com) wrote:
> On Wed, Aug 10, 2011 at 01:41:01PM -0400, Mathieu Desnoyers wrote:
> > Copy the information needed from struct module into a local module list
> > held within tracepoint.c from within the module coming/going notifier.
> >
> > This vastly simplifies locking of tracepoint registration /
> > unregistration, because we don't have to take the module mutex to
> > register and unregister tracepoints anymore. Steven Rostedt ran into
> > dependency problems related to modules mutex vs kprobes mutex vs ftrace
> > mutex vs tracepoint mutex that seems to be hard to fix without removing
> > this dependency between tracepoint and module mutex. (note: it should be
> > investigated whether kprobes could benefit of being dissociated from the
> > modules mutex too.)
> >
> > This also fixes module handling of tracepoint list iterators, because it
> > was expecting the list to be sorted by pointer address. Given we have
> > control on our own list now, it's OK to sort this list which has
> > tracepoints as its only purpose. The reason why this sorting is required
> > is to handle the fact that seq files (and any read() operation from
> > user-space) cannot hold the tracepoint mutex across multiple calls, so
> > list entries may vanish between calls. With sorting, the tracepoint
> > iterator becomes usable even if the list don't contain the exact item
> > pointed to by the iterator anymore.
> >
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > CC: Steven Rostedt <rostedt@goodmis.org>
> > CC: Ingo Molnar <mingo@elte.hu>
> > CC: Lai Jiangshan <laijs@cn.fujitsu.com>
> > CC: Peter Zijlstra <peterz@infradead.org>
> > CC: tglx@linutronix.de
> > ---
> > include/linux/module.h | 12 ---
> > include/linux/tracepoint.h | 25 +++---
> > kernel/module.c | 47 ------------
> > kernel/tracepoint.c | 165 +++++++++++++++++++++++++++++++++++++++------
> > 4 files changed, 156 insertions(+), 93 deletions(-)
>
> Hi Mathieu,
>
> This is similar to the approach we have taken in the jump label code -
> on module insert/remove we store pointers into module table, so that we
> don't require the module_mutex during update time. It has been working
> well there, so this design makes sense to me at least.
OK, I'll add your acked-by. Thanks!
Mathieu
>
> Thanks,
>
> -Jason
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2011-08-10 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 17:41 [RFC PATCH][3.0] Tracepoint: dissociate from module mutex Mathieu Desnoyers
2011-08-10 18:05 ` Jason Baron
2011-08-10 19:00 ` Steven Rostedt
2011-08-10 19:16 ` Mathieu Desnoyers [this message]
2011-08-10 19:00 ` Steven Rostedt
2011-08-10 19:16 ` Mathieu Desnoyers
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=20110810191627.GA8525@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=jbaron@redhat.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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