Uses for access time

John Young jgy at hropus.UUCP
Thu Apr 28 11:09:11 AEST 1988


> In article <3672 at lynx.UUCP>, m5 at lynx.UUCP (Mike McNally ) writes:
> > I am trying to convince some of my ``colleagues'' here that keeping track
> > of last-access times of files is a useful pursuit for an operating system.
> > [...]
> > Are these reasons enough to justify the overhead (I think so)?  Are there
> > other reasons that I am overlooking?
> 
> Starting on a related topic:
> 
> I believe the access time of a UNIX file must be updated after
> each read (not just at the open).  Since mounting a filesystem
> readonly turns this update mechanism off because the inode is not
> writable, I would assume that this would speed up a filesystem
> slightly: does anybody have any experience on this?
> 
> -- 
> Steve Friedl           V-Systems, Inc.        Spaf for president!
> friedl at vsi.com   {backbones}!vsi.com!friedl    attmail!vsi!friedl

The time spent doing this is minimal.  The inode is in-core and being
accessed anyway.  The "overhead" is simply the assignment:

	iptr->a_time = lbolt;		(or whatever the clock/time is)

This is done regardless of whether or not the fs is mounted readonly.
(not worth the effort to check I suppose).  There is no need to ever
write the inode to disk until the "access" is finished with (final close)
so that't the only time when you'll get that modest saving.


			John Young



More information about the Comp.unix.wizards mailing list