Re: [PATCH v7 3/6] kernfs: use VFS negative dentry caching

From: Miklos Szeredi
Date: Wed Jun 16 2021 - 05:12:51 EST


On Tue, 15 Jun 2021 at 12:26, Ian Kent <raven@xxxxxxxxxx> wrote:
>
> If there are many lookups for non-existent paths these negative lookups
> can lead to a lot of overhead during path walks.
>
> The VFS allows dentries to be created as negative and hashed, and caches
> them so they can be used to reduce the fairly high overhead alloc/free
> cycle that occurs during these lookups.
>
> Use the kernfs node parent revision to identify if a change has been
> made to the containing directory so that the negative dentry can be
> discarded and the lookup redone.
>
> Signed-off-by: Ian Kent <raven@xxxxxxxxxx>

Reviewed-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>