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 09:54:14
On Tue, Jun 28, 2005 at 10:35:55AM +0900, YAMAMOTO Takashi wrote:
> > description of these fields indicates we should note.
>
> it's too expensive and unreasonable to detect every actual read of
> memory for atime update.
Sure.
>
> 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.
>
> > I realize we are being a bit fuzzy with things in that we do the updates
> > in GETPAGES(). If I'm understanding how this works, if a page is resident
> > and never gets pushed out, a process could keep using a page and we won't
> > see subsequent updates to atime (or mtime). But I think what we're doing
> > is better than just noting at mmap time.
>
> it's what i called "randomly".
>
> 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 ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--