From owner-freebsd-current@FreeBSD.ORG Fri Mar 20 19:19:47 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 989CD106564A for ; Fri, 20 Mar 2009 19:19:47 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (brucec-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:c09::2]) by mx1.freebsd.org (Postfix) with ESMTP id 690938FC1E for ; Fri, 20 Mar 2009 19:19:47 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 16A9C1902C; Fri, 20 Mar 2009 19:19:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Received: from gluon (unknown [IPv6:2a01:348:10f:0:240:f4ff:fe57:9871]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Fri, 20 Mar 2009 19:19:45 +0000 (GMT) Date: Fri, 20 Mar 2009 19:19:38 +0000 From: Bruce Cran To: Dimitry Andric Message-ID: <20090320191938.25d85caa@gluon> In-Reply-To: <49C37B75.5060905@andric.com> References: <49BE7C5A.2080103@icyb.net.ua> <10611.1237233778@critter.freebsd.dk> <20090320074833.67d615e2@gluon> <49C37B75.5060905@andric.com> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.15.5; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Poul-Henning Kamp , freebsd-current@freebsd.org, Andriy Gapon Subject: Re: ata: printf on every spinup/spindown? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 19:19:48 -0000 On Fri, 20 Mar 2009 12:18:13 +0100 Dimitry Andric 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