Subject: Re: kern/25279: NFS read doesn't update atime
To: None <bouyer@antioche.lip6.fr>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/28/2005 18:28:04
> > > > 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.

actually, it gives you less info, given the fact that you can't
predict when it's updated.

however, ok, i changed my mind after reading susv3. :-)

    The st_atime field of the mapped file may be marked for update at any time
    between the mmap() call and the corresponding munmap() call. The initial
    read or write reference to a mapped region shall cause the file's st_atime
    field to be marked for update if it has not already been marked for update.

YAMAMOTO Takashi