On Wed, Feb 24, 2021 at 10:11 AM Tom Talpey <tom@xxxxxxxxxx> wrote: > > On 2/23/2021 8:03 PM, Steve French wrote: > > Updated version incorporates Ronnie's suggestion of leaving the > > default (for directory caching) the same as it is today, 1 second, to > > avoid > > unnecessary risk. Most users can safely improve performance by > > mounting with acdirmax to a higher value (e.g. 60 seconds as NFS > > defaults to). > > > > nfs and cifs on Linux currently have a mount parameter "actimeo" to control > > metadata (attribute) caching but cifs does not have additional mount > > parameters to allow distinguishing between caching directory metadata > > (e.g. needed to revalidate paths) and that for files. > > The behaviors seem to be slightly different with this change. > With NFS, the actimeo option overrides the four min/max options, > and by default the directory ac timers range between 30 and 60. > > The CIFS code I see below seems to completely separate actimeo > and acdirmax, and if not set, uses the historic 1 second value. > That's fine, but it's completely different from NFS. Shouldn't we > use a different mount option, to avoid confusing the admin? Ugh ... You are probably right. I was trying to avoid two problems: 1) (a minor one) adding a second mount option rather than just one (to solve the same problem). But reducing confusion is worth an extra mount option 2) how to avoid the user specifying *both* actimeo and acregmax - which one 'wins' (presumably the last one in the mount line) We could check for this and warn the user in mount.cifs so maybe not important to worry about in the kernel though. I will add the acregmax mount option and change actimeo to mean if (actimeo is set) acregmax = acdirmax = actimeo -- Thanks, Steve