On Fri, Jun 07, 2024 at 12:04:58PM +1000, Dave Chinner wrote: > On Thu, Jun 06, 2024 at 04:05:15PM +0200, Mateusz Guzik wrote: > > Instantiating a new inode normally takes the global inode hash lock > > twice: > > 1. once to check if it happens to already be present > > 2. once to add it to the hash > > > > The back-to-back lock/unlock pattern is known to degrade performance > > significantly, which is further exacerbated if the hash is heavily > > populated (long chains to walk, extending hold time). Arguably hash > > sizing and hashing algo need to be revisited, but that's beyond the > > scope of this patch. > > > > A long term fix would introduce fine-grained locking, this was attempted > > in [1], but that patchset was already posted several times and appears > > stalled. > > Why not just pick up those patches and drive them to completion? > Time constraints on my end aside.