Subject: Re: kern/25279: NFS read doesn't update atime
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 06/27/2005 22:17:21
On Tue, Jun 28, 2005 at 10:35:55AM +0900, YAMAMOTO Takashi wrote:
> it's too expensive and unreasonable to detect every actual read of
> memory for atime update.
> 
> if you consider mmap for read as a lazy implementation of read(2),
> it's appropriate to note it at mmap time.
> 
> 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.
> updating mtime in VOP_GETPAGES is somewhat improper, IMO.

For whatever it's worth, I agree with all of the above.  To restate:

Update atime on mmap(...PROT_READ...)
Update mtime when flushing dirty mmapped pages out to backing store.

I would expect neither more nor less.

-allen

-- 
                  Use NetBSD!  http://www.NetBSD.org/