On 3/10/25 17:42, Miklos Szeredi wrote: > On Fri, 7 Mar 2025 at 16:31, Luis Henriques <luis@xxxxxxxxxx> wrote: > >> Any further feedback on this patch, or is it already OK for being merged? > > The patch looks okay. I have ideas about improving the name, but that can wait. > > What I think is still needed is an actual use case with performance numbers. > >> And what about the extra call to shrink_dcache_sb(), do you think that >> would that be acceptable? Maybe that could be conditional, by for example >> setting a flag. > > My wish would be a more generic "garbage collection" mechanism that > would collect stale cache entries and get rid of them in the > background. Doing that synchronously doesn't really make sense, IMO. > > But that can be done independently of this patch, obviously. Can't that be done in fuse-server? Maybe we should improve notifications to allow a batch of invalidations? I'm a bit thinking about https://github.com/libfuse/libfuse/issues/1131 I.e. userspace got out of FDs and my guess is it happens because of dentry/inode cache in the kernel. Here userspace could basically need to create its own LRU and then send invalidations. It also could be done in kernel, but kernel does not know amount of max open userspace FDs. We could add it into init-reply, but wouldn't be better to keep what we can in userspace? Thanks, Bernd