On Tue, 24 Sept 2024 at 17:17, Dave Chinner <david@xxxxxxxxxxxxx> wrote: > > FWIW, I think all this "how do we cache inodes better" discussion is > somehwat glossing over a more important question we need to think > about first: do we even need a fully fledged inode cache anymore? I'd be more than happy to try. I have to admit that it's largely my mental picture (ie "inode caches don't really matter"), and why I was surprised that the inode locks even show up on benchmarks. If we just always drop inodes when the refcount goes to zero and never have any cached inodes outside of other references, I think most of the reasons for the superblock inode list just disappear. Most of the heavy lifting has long since been moved to the dentry shrinking. I'd worry that we have a lot of tuning that depends on the whole inode LRU thing (that iirc takes the mapping size etc into account). But maybe it would be worth trying to make I_DONTCACHE the default, with the aim of removing the independent inode lifetimes entirely... Linus