Re: [PATCH 00/16 v3] tracing: Add new file system tracefs

From: Steven Rostedt
Date: Tue Jan 27 2015 - 10:20:03 EST


On Tue, 27 Jan 2015 04:38:39 +0000
Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> On Mon, Jan 26, 2015 at 08:03:50PM -0500, Steven Rostedt wrote:
> > On Mon, 26 Jan 2015 20:02:18 -0500
> > Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> >
> >
> > > Now you see why I found just dropping the parent mutex easier.
> >
> > And this is probably why kernfs does things the way it does. I can
> > imagine it having the same locking issues.
>
> The least said about kernfs locking, the better...
>
> As for the use of trace_types_lock to serialize rmdir vs. event
> addition/removal, I wonder what's wrong with actually using the
> ->i_mutex of /instances - you have a reference to its dentry,
> after all...

You mean, instead of grabbing trace_types_lock for modifying of events
and trace arrays, we should grab the dentry->d_inode->i_mutex?

BTW, what exactly can go wrong with the current method I have that
releases the i_mutex, calls the mkdir() method, and then regrabs the
i_mutex?

-- Steve
--
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/