On Sat, 11 May 2024 at 09:07, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > Now, the other option might be to just make the latency concerns > smaller. It's not like removing negative dentries is very costly per > se. I think the issue has always been the dcache_lock, not the work to > remove the dentries themselves. Actually, going back to re-read this particular report, at least this time it was the inode lock of the parent, not the dcache_lock. But the point ends up being the same - lots of negative dentries aren't necessarily a problem in themselves, because the common operation that matters is the hash lookup, which scales fairly well. They mainly tend to become a problem when they hold up something else. So better batching, or maybe just walking the negative child dentry list after having marked the parent dead and then released the lock, might also be the solution. Linus