Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 1996 02:57:12 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, dg@root.com
Cc:        bugs@freebsd.org
Subject:   Re: another POSIX access timestamp pessimization
Message-ID:  <199612281557.CAA22346@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>POSIX says that "Upon successful completion, the exec functions shall
>>mark for update the st_atime field of the file".  Not content with
>
>   In my opinion, "tough". This is one part of POSIX that I'm not interested
>in being compatible with since the cost is too great. It may not be much of
>an issue at exec time, but the disk I/O caused by the update of the access
>time that occurs later is extremely expensive.

This problem affects many things other than the access times for exec'ed
binaries, even for exec itself for shared libraries.  E.g., execing
/usr/bin/du accesses the following files:

	ld.so (crt0 begins by reading 0x20 bytes from this, so its access
	       time gets set.  After that it is only accessed via mmap(),
	       which I think doesn't set the access time, but probably
	       should (at fault time))
	ld.so.hints (ld.so begins by reading 0x20 bytes from this)
	libc.so.3.0 (ld.so begins by reading 0x20 bytes from this)

crt0 and ld.so read the a.out header for some reason before mmapping the
whole file.  Of course, the problem is not so large because there are
only a few library files so caching works.

I forgot to say that the access time already gets set when scripts are
execed, since something has to read the script.

Access times are set on exec in Linux-2.0.27.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612281557.CAA22346>