On Wed, 29 Nov 2023 00:17:38 +0900
Masami Hiramatsu (Google) <mhira...@kernel.org> wrote:

> Hi Steve,
> 
> On Mon, 27 Nov 2023 17:41:08 -0500
> Steven Rostedt <rost...@goodmis.org> wrote:
> 
> > From: "Steven Rostedt (Google)" <rost...@goodmis.org>
> > 
> > A trace instance may only need to enable specific events. As the eventfs
> > directory of an instance currently creates all events which adds overhead,
> > allow internal instances to be created with just the events in systems
> > that they care about. This currently only deals with systems and not
> > individual events, but this should bring down the overhead of creating
> > instances for specific use cases quite bit.  
> 
> This sounds good, but can the eventfs reduce such overhead because
> if the user doesn't touch the actual event, the event dentry will
> be released soon?

Yes, but this also removes the creation of the meta data behind it. Which
has a descriptor for every event. And since there are over a thousand
events, this is still quite a bit of savings. It also removes the
eventfs_inode that represents each directory.

> > Note, this may also be useful for creating instances in the eventfs, but
> > I'm not sure how to do this there. I could add a deliminator:
> > 
> >   mkdir /sys/kernel/tracing/instances/foo::sched,timer  
> 
> Can we limit this after making an instance? In that case, we can use
> rmdir to remove unused "systems" directories. Or, maybe we can create
> it afterwards with mkdir or use comand to a pseudo file.
> 
> echo sched:* timer:* > instances/foo/available_events

That, or I even thought of allowing rmdir on event systems, and even mkdir.

 # cd instance/foo/events
 # rmdir *
 # mkdir sched timer

-- Steve

Reply via email to