Subject: power mgt, update, and the FFS..
To: None <port-i386@NetBSD.ORG>
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
List: port-i386
Date: 03/17/1996 09:20:16
-----BEGIN PGP SIGNED MESSAGE-----

For maximal battery life on portables, you really want to keep the
disk spun down as much as possible.  Unfortunately, various things
conspire to make this difficult unless you turn off the "update"
program..

Here are two ideas for improving the current situation:

	1) change `/sbin/update' to let the time-between-syncs be a
	   configurable parameter.  On laptops, you have your own
	   UPS, so letting users change the period to 5 or 10 minutes
	   instead of 30 seconds would be reasonable.

	2) change FFS to keep "fuzzy" access times.

	   Most use of the atime field is to determine "have I looked
	   at this file in the past n days", and doesn't generally
	   require accuracy to the nanosecond..

	   the proposal is, when updating the atime field, to not
	   change it (and not dirty the inode/bufcache page) if the
	   timestamp is within <fuzz> of the current time.

	   In ufs_getattr, one could return a worst-case access time,
	   min((atime + fuzz), current_time), to prevent existing
	   "accessed in last N days" scripts from missing any files.

Anybody think either of these is completely crazy?

					- Bill

-----BEGIN PGP SIGNATURE-----
Version: 2.6.1

iQCVAwUBMUwflbT+rHlVUGpxAQF0aAQAheYxJxTF/qJStEa4Zkzwf73v+ynR5VE1
hNBj+DkqFKrXgVvk1C6xvCShAuDjRAs9CqVg+FwZq/jf+pOQd4LEnqAJoFrwSFYW
WXhkz8YbSDt5Z+XwMKpQmhDz0uQZjvZERJzbEvF6hmPogkfvNBm4frBkr5BnEUKT
LNBtwmbHzSY=
=Xhic
-----END PGP SIGNATURE-----