Re: [for-next][PATCH 0/8] tracing: Addition of multiple buffers

From: Steven Rostedt
Date: Wed Feb 27 2013 - 14:42:08 EST

On Wed, 2013-02-27 at 11:37 -0800, David Sharp wrote:
> On Wed, Feb 27, 2013 at 9:22 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > With this patch set, a new directory is created in the debug/tracing
> > directory called "instances". Here you can mkdir/rmdir a new directory
> > that will contain some of the files in the debug/tracing directory.
> > Note, this is not totally finished, but it's at a point were it is
> > functional and useful.
> >
> > To add mkdir/rmdir in debugfs, as debugfs does not support these operations,
> Is there some reason not to extend debugfs to support mkdir/rmdir?

Yeah, Greg KH NACK'd the idea, and he's the debugfs maintainer.

He also suggested the tracefs addition, which I do intend on doing, but
until then this is going to be the work around.

-- Steve

> > I had to have the instances' inode use its own inode_operations and add a
> > mkdir and rmdir method. As the instances directory can not be renamed
> > or removed, or modified in any other way, it has the inode mutex released
> > in order to call back to create or remove the debugfs directories.
> > It has its own mutex to protect against multiple instances of this,
> > and I've run many stress tests to make sure it can't crash. I haven't
> > found were it can. The alternative is to have a "new" and "free" file
> > to create and remove directories and it will basically do the exact
> > same thing that the mkdir/rmdir does now, with the exact same protection.
> > I do eventually want to make a tracefs, but that requires a lot of
> > design planning and wont be in the near future (too many other things
> > to do).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at