Subject: Re: kern/25279: NFS read doesn't update atime
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 06/28/2005 10:57:47
On Tue, Jun 28, 2005 at 05:42:17PM +0900, YAMAMOTO Takashi wrote:
> > > if you consider mmap for read as a lazy implementation of read(2),
> > > it's appropriate to note it at mmap time.
> > 
> > It would be, but I don't see a problem with updating it when a page is faulted
> > in. 
> 
> updating on fault makes it almost unpredictable.

But I don't see a problem with this. atime for a mmaped file can't be updated
for each read anyway, so it's not accurate. But it provide better infos to
update it once in a while, when there is a page fault, than never.

> 
> > > talking about mtime, i think it can be noted when the changes are
> > > flushed out to backing store.  ie. when we usually notice the dirtiness
> > > of the pages.
> > 
> > Yes, this is appropriate. Otherwise, tools like dump won't work properly.
> > 
> > > updating mtime in VOP_GETPAGES is somewhat improper, IMO.
> > 
> > It could be updated in VOP_PUTPAGES(), isn't it ?
> 
> yes, i meant so.

OK, I'll look at this too.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--