Subject: Re: kern/25279: NFS read doesn't update atime
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 07/04/2005 09:36:41
On Wed, Jun 29, 2005 at 08:13:43PM +0200, Manuel Bouyer wrote:
> On Wed, Jun 29, 2005 at 09:32:06AM -0700, Chuck Silvers wrote:
> > > It is if the "correct" fix can't be pulled up to branches.
> > 
> > after some thought I realized that the change you were proposing yesterday
> > had much worse problems.  every vnode that left the vnode cache or had pages
> > (clean or dirty) invalidated would have its mtime updated.  I tried it out
> > just to verify this, and the mtimes on /sbin/init, /lib/libc.so.*, etc on
> > my test machine were updated to the time I last rebooted the machine while
> > running a test kernel with that change.  so that particular change had
> > problems that were even worse than the issue it was attempting to fix.
> 
> This mean VOP_PUTPAGES is called for unmodified pages too ?

VOP_PUTPAGES() can perform several functions:
 - writing back modified pages
 - invalidating pages
 - artificially aging pages, allowing them to be reclaimed
   by the pagedaemon sooner

the caller of VOP_PUTPAGES() only knows the vnode and range of logical offsets
that he wants to affect, he doesn't necessarily know if pages in that range
are dirty (or if they even exist in the cache).

-Chuck