From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 16 14:57:22 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF75A1065679; Thu, 16 Sep 2010 14:57:22 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7EB8FC21; Thu, 16 Sep 2010 14:57:22 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id o8GEg04S068467; Thu, 16 Sep 2010 08:42:00 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id o8GEg0Fi068464; Thu, 16 Sep 2010 08:42:00 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 16 Sep 2010 08:42:00 -0600 (MDT) From: Warren Block To: Alexander Best In-Reply-To: <20100916004902.GA46401@freebsd.org> Message-ID: References: <201009152143.o8FLhE9p022233@lurza.secnetix.de> <20100916004902.GA46401@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (wonkity.com [127.0.0.1]); Thu, 16 Sep 2010 08:42:00 -0600 (MDT) Cc: freebsd-hackers@FreeBSD.ORG, mav@FreeBSD.ORG, Oliver Fromme Subject: Re: Summary: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 14:57:22 -0000 On Thu, 16 Sep 2010, Alexander Best wrote: > On Wed Sep 15 10, Oliver Fromme wrote: >> Warren Block wrote: >> > [...] >> > 8. Alexander Motin has an updated CAM version of the ATA system which >> > will eventually replace the existing one. In -CURRENT, anyway. He was >> > kind enough to look at my event handler. My understanding is that he is >> > looking at implementing the head parking/standby mechanism in that new >> > code. >> >> The patch below will work with the new CAM ATA driver >> (i.e. ada(4) disks). It adds a sysctl, so you can switch >> the spin-down off if you're going to just reboot: >> # sysctl kern.cam.ada.spindown_shutdown=0 > > i haven't tested your patch yet, but i don't think deciding whether to spin > down the hdd should be decided merely from the sysctl value. > > the hdd should spindown when a shutdown has been issued and not spindown, > if a reboot has been issued. It's been a while, but the problem I found when comparing the NetBSD code was that there didn't appear to be a way to tell from within the FreeBSD driver whether it was a shutdown or reboot.