2008-01-18 21:13:56

by Chuck Lever

[permalink] [raw]
Subject: Re: [PATCH 2/3] NFS: Add NFS_MOUNT_NONEGDE flag to avoid caching negative dentries

Hi Bob-

On Jan 18, 2008, at 10:29 AM, Bob Bell wrote:
> On Wed, Jan 16, 2008 at 03:49:20PM -0500, Chuck Lever wrote:
>> On Jan 16, 2008, at 3:43 PM, Trond Myklebust wrote:
>>> How about
>>> -odircache=aggr[essive] /* Full caching */
>>> -odircache=noneg[ative] /* Positive lookups only */
>>> -odircache=off /* strict lookup revalidation */
>>
>> "-olookupcache=" would be even more specific, if not more
>> verbose. dircache=off implies that not even readdir results are
>> cached.
>>
>> -olookupcache=full
>> -olookupcache=pos[itive]
>> -olookupcache=strict
>
> I think that "lookupcache" is a little more accurate, and perhaps
> worth the verbosity. "dircache" could be misinterpreted to imply
> that directory listings are being cached -- which, incidentally,
> I'm start to receive complaints is a problem for us, too...
>
> Converstation on this seems to have died down, and I'm ready to
> revisit the patch. I'm inclined to go with:
> -o lookupcache=full
> -o lookupcache=pos[itive]
> -o lookupcache=none
>
> If you have a strong (enough) opinion otherwise, please speak up
> now and save me the trouble of an extra pass at the patch...


I understand that lookupcache=full would be current behavior, and
=positive would prevent caching negative dentries.

When would anyone want to use lookupcache=none -- what exactly would
it do? How is it different than actimeo=0?

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





2008-01-18 21:18:04

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH 2/3] NFS: Add NFS_MOUNT_NONEGDE flag to avoid caching negative dentries


On Fri, 2008-01-18 at 16:12 -0500, Chuck Lever wrote:

> When would anyone want to use lookupcache=none -- what exactly would
> it do? How is it different than actimeo=0?

It would be very different. The idea of lookupcache=none would be to
turn off the directory mtime-based revalidation algorithm in
nfs_lookup_revalidate().
IOW: you would force an on-the-wire LOOKUP call for each dentry
revalidation.

Cheers
Trond