mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tejun Heo <tj@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH 0/5] tracing: Add new file system tracefs
Date: Thu, 22 Jan 2015 10:15:30 -0500	[thread overview]
Message-ID: <20150122101530.2175cf2b@gandalf.local.home> (raw)
In-Reply-To: <20150122145547.GB4507@htj.dyndns.org>

On Thu, 22 Jan 2015 09:55:47 -0500
Tejun Heo <tj@kernel.org> wrote:

> kernfs provides two sets of file operations.  One is seq_file based
> and the other is direct read/write.  In both cases, bouncing data
> between userland and kernel is handled by kernfs.  If you already have
> existing read write ops implemented doing custom buffer handling and
> direct userland memory access, it'll take some adaptation but for a
> lot of cases this would consolidate duplicate code paths.

Does it also handle splice? That's a key part of the tracing code.

Almost every tracing file is somewhat unique. When things can be
shared, they are, but there's not much generic code that can be shared.

> 
> > I created tracefs with 700 lines of code and two files (inode.c and
> > tracefs.h), and for the users of tracefs, I just did
> > s/debugfs/tracefs/. If I can't make that substitution for the users,
> > that is a show stopper.
> > 
> > I don't see how I can use kernfs without it causing a lot of invasive
> > changes to the ftrace subsystem.
> 
> Converting an existing vfs based pseudo fs implementation over to
> kernfs isn't trivial.  I mean, if that were trivial, why would kernfs
> even exist?  kernfs is a layer which abstracts a large part of pseudo
> filesystem which provides extra features like significantly lower
> memory footprint with large number of nodes and revocation support in
> a way that its users, for the most part, hopefully, only have to worry
> about the content to provide to userland.

Sounds like some of the tracing files could benefit from this. But I'm
not sure kernfs has all the necessary features I need.

> 
> I frankly have no idea whether tracefs would be a good candidate for
> kernfs usage but if you're looking for a mechanical one-to-one
> conversion from vfs based implementation, that's not gonna work.

OK, thanks. Perhaps if tracing was still new I could have tried to go
with kernfs. But as debugfs was such a simple to use interface, it let
me concentrate more on the complexities of tracing itself instead of
spending time coming up with a complex interface.

If a one to one conversion to vfs is not gonna work, I'm going to be
interested in seeing how debugfs will be converted.

Anyway, I think I'm convinced that kernfs is not yet the way to go. I'm
going to continue on with my current path.

Thanks,

-- Steve

  reply	other threads:[~2015-01-22 15:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 17:19 Steven Rostedt
2015-01-21 17:19 ` [RFC][PATCH 1/5] tracefs: Add new tracefs file system Steven Rostedt
2015-01-21 18:30   ` Steven Rostedt
2015-01-21 17:19 ` [RFC][PATCH 2/5] tracing: Convert the tracing facility over to use tracefs Steven Rostedt
2015-01-21 17:32   ` Steven Rostedt
2015-01-21 17:19 ` [RFC][PATCH 3/5] tracing: Automatically mount tracefs on debugfs/tracing Steven Rostedt
2015-01-21 17:19 ` [RFC][PATCH 4/5] tracing: Have mkdir and rmdir be part of tracefs Steven Rostedt
2015-01-21 18:31   ` Steven Rostedt
2015-01-21 20:47   ` Steven Rostedt
2015-01-21 17:19 ` [RFC][PATCH 5/5] tracefs: Add directory /sys/kernel/tracing Steven Rostedt
2015-01-21 17:32 ` [RFC][PATCH 0/5] tracing: Add new file system tracefs Steven Rostedt
2015-01-21 23:00 ` Greg Kroah-Hartman
2015-01-22  1:47   ` Steven Rostedt
2015-01-22  3:07     ` Steven Rostedt
2015-01-22  3:18       ` Greg Kroah-Hartman
2015-01-22  3:51         ` Steven Rostedt
2015-01-22 12:32           ` Tejun Heo
2015-01-22 12:33             ` Tejun Heo
2015-01-22 14:32             ` Steven Rostedt
2015-01-22 14:55               ` Tejun Heo
2015-01-22 15:15                 ` Steven Rostedt [this message]
2015-01-22 15:24                   ` Tejun Heo
2015-01-22  4:23   ` Al Viro
2015-01-22  4:35     ` Steven Rostedt
2015-01-22 12:49       ` Tejun Heo
2015-01-22 12:26     ` Tejun Heo

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=20150122101530.2175cf2b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tj@kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®