Re: [RFC PATCH] vfs: add rcu-based find_inode variants for iget ops

From: Dave Chinner
Date: Thu Jun 06 2024 - 22:05:14 EST


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?

I have no issues with somebody else doing the finishing work for
that code; several of the patches in that series were originally
written by other people in the first place...

-Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx