Re: ata: printf on every spinup/spindown?

From: Bruce Cran <bruce_at_cran.org.uk>
Date: Fri, 20 Mar 2009 19:19:38 +0000
On Fri, 20 Mar 2009 12:18:13 +0100
Dimitry Andric <dimitry_at_andric.com> wrote:

> On 2009-03-20 08:48, Bruce Cran wrote:
> > Related to this, the ATA driver should probably have some means,
> > either automatically or via atacontrol, of setting the APM value on
> > disks; I bought a new laptop and immediately had to install
> > sysutils/ataidle in order to stop the heads loading/unloading
> > several times per minute by setting APM to 254.  Apparently it's
> > fairly common for laptop drives to have overly aggressive power
> > settings that need intervention from the OS.
> 
> I have been running with the attached patch since ages, and it still
> applies to -stable, hopefully to -current too.  I have forgotten who
> the original author is, so my apologies for not crediting it...


There's a reluctance to include code like this, I
think because it bypasses the ATA driver and talks directly to the
drive. Since the driver doesn't know what the drive's been told to do,
it can't know to adjust timers etc. to wait for the disk to spin back
up, for example.  I believe other systems like Linux and NetBSD do
bypass the driver as your patch to atacontrol does, but in FreeBSD the
driver appears to be much more sensitive to it, resulting in panics and
read timeouts because it assumes the drive is always active and ready
to respond to requests.

-- 
Bruce Cran
Received on Fri Mar 20 2009 - 18:19:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:44 UTC