Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 2013 15:52:09 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        freebsd-fs@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: VOP_MKDIR/VOP_CREATE and namecache
Message-ID:  <201307241552.09988.jhb@freebsd.org>
In-Reply-To: <51EFC854.3090908@FreeBSD.org>
References:  <51E968FC.20905@FreeBSD.org> <201307221110.32011.jhb@freebsd.org> <51EFC854.3090908@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, July 24, 2013 8:28:04 am Andriy Gapon wrote:
> on 22/07/2013 18:10 John Baldwin said the following:
> > On Friday, July 19, 2013 12:27:40 pm Andriy Gapon wrote:
> >>
> >> Should VOP_MKDIR and VOP_CREATE immediately insert newly created vnodes into the
> >> namecache?  If yes, where would it be done best?  FS code, VFS code, VOP
> >> post-hooks, something else?
> > 
> > Hmm, I'm not sure.  However, if it is done, I think it needs to be done in the
> > FS code (e.g., NFS needs to be able to add it's special timestamps).
> > 
> > In UFS you could do this by just adding a cache_enter() call to ufs_direnter().
> > For NFS you would want the post-op attrs from the RPC reply (assuming it includes
> > attrs for the parent directory).
> > 
> 
> I've read this as "don't bother" :-)
> Thank you for the feedback!

Well, for UFS it would be a one-line change.  If there is a common workload where
this would help it might be interesting to benchmark.  Note that UFS is careful to
prime new directory entries into the existing dirhash for example (which may make
priming the namecache less of a win for UFS).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307241552.09988.jhb>