Subject: Re: kern/25279: NFS read doesn't update atime
To: None <bouyer@antioche.eu.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/27/2005 08:02:59
> > doesn't it make write(2) and mmap'ed accesses update atime
> > in somewhat unpredictable manner?
> 
> For mmap'ed accesses, probably. But I don't think this is a problem,
> because if we're faulting in a page via mmap(), we're reading the file,
> isn't it ?

i agree that it shouldn't be a problem, because it's
the pre-ubc behaviour, iirc.

> For write, yes, it can be a problem if a write can cause a page to be
> read via VOP_GETPAGES() (this I don't know).

yes, it does.

> But maybe we can avoid it,
> by checking PGO_OVERWRITE in ap->a_flags ? This is already done in
> ffs_getpages() for something else.

i don't think there is an easy way to avoid it.

> > for long term, i think it's better to extend VOP_SETATTR so that
> > it can be used for this purpose.
> 
> Yes, this is the direction I initially took (my idea was to add another vnop,
> but it's the same idea). The problem is that it can't be pulled up to the
> netbsd-2 branch, and maybe not the netbsd-3 brnach either (this is a kernel
> API change).

changing getpages semantics is also an API change.

> > (although i think it's silly to rely on atime over nfs...)
> 
> Lots of things rely on this (especially email tools). It's also a usefull
> statistic tool to see which files are really used on a NFS server.

yes, i know it isn't an ideal world. :-)

YAMAMOTO Takashi