Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

From: Steven Rostedt
Date: Tue Jan 30 2024 - 16:25:07 EST


On Tue, 30 Jan 2024 11:03:55 -0800
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> Another thing that might be worth doing is to make all eventfs lookups
> mark their dentries as not worth caching. We could do that with
> d_delete(), but the DCACHE_DONTCACHE flag would likely be even better.
>
> As it is, the dentries are all freeable, but they only tend to get freed
> at memory pressure rather than more proactively. But that's a separate
> issue.

I actually find the dentry's sticking around when their ref counts go to
zero a feature. Tracing applications will open and close the eventfs files
many times. If the dentry were to be deleted on every close, it would need
to be create over again in short spurts.

There's some operations that will traverse the tree many times. One
operation is on reset, as there's some dependencies in the order of
disabling triggers. If there's a dependency, and a trigger is to be
disabled out of order, the disabling will fail with -EBUSY. Thus the tools
will iterate the trigger files several times until it there's no more
changes. It's not a critical path, but I rather not add more overhead to it.

-- Steve