Subject: Re: test of new powerdown facility
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 06/11/1998 02:57:17
On Thu, 11 Jun 1998 12:00:19 +0200
Manuel Bouyer <bouyer@antioche.lip6.fr> wrote:
> Ok, I hacked my driver to disable the write cache: performances are
> much slower (tested with a 'dd if=/dev/zero of=/dev/rwd0b bs=64k count=500':
> 14s with write cache, 21s without). But this solves the problem.
> I don't think this performance loss is acceptable.
> ATA-3 doesn't have a 'flush cache' command. ATA-4 has one, but it is marked
> optional. So we can't rely on it.
> Erik E. Fair suggested that we disable the write cache at unmount time,
> and re-enable it at 'mount -rw'. I'll look at how to implement this.
More appropriately, "disable write cache on last close" and "enable
write cache when device is opened for writing".
Also, if you panic, you won't unmount the file systems, so you won't
get "last close". So, you _ALSO_ want a shutdown hook that disables
the write cache at shutdown time (assuming that disabling the write
cache has the effect of flushing it).
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-5 Work: +1 650 604 0935
Moffett Field, CA 94035 Pager: +1 650 428 6939