Subject: Re: kern/25279: NFS read doesn't update atime
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/27/2005 15:58:17
--UBnjLfzoMQYIXCvq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 28, 2005 at 07:25:10AM +0900, YAMAMOTO Takashi wrote:
> > Because peoples don't look at the access time that often. But it's usef=
ull
> > for diagnostics and statistics.
>=20
> well, i have not heard any complaints about mtime either. (other than min=
e)
> because mmap is rarely used, i guess.

I'll admit I don't use it much, but I think mtime updating would be good.

> > > due to VOP_GETPAGES called by ufs_balloc_range?
> >=20
> > Yes, that's it. Testing !(ap->a_flags & PGO_PASTEOF) in addition to
> > !(ap->a_access_type & VM_PROT_WRITE) makes the atime behaves as expecte=
d,
> > from my tests.
> > But we probably want a PGO_NOATIME (or maybe PGO_RMW, for read-modify-w=
rite)
> > flag for this kind of access instead.
>=20
> you might want to use VM_PROT_NONE for VOP_GETPAGES in ufs_balloc_range as
> what it actually does is just holding pages without accessing them.
> then you can check VM_PROT_READ, which is more straightforward than
> VM_PROT_WRITE.
>=20
> however, i still don't like the idea to update atime in VOP_GETPAGES.
> it sounds like "update randomly" to me.
> if we want to update atime for mmap, i prefer to do it when a file is mma=
p'ed.

Why? Isn't mtime the time of last modification? Thus shouldn't it be=20
noted?

Take care,

Bill

--UBnjLfzoMQYIXCvq
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFCwISJWz+3JHUci9cRAnk8AJoCjEecEK8xc7pidLTZO5q4VmO/2QCfbROQ
AConD/QqD1mTINOKLthpSOo=
=IzO3
-----END PGP SIGNATURE-----

--UBnjLfzoMQYIXCvq--