From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 4 12:46:37 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 3AF2A1065697; Thu, 4 Feb 2010 12:46:37 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id B649A8FC0A; Thu, 4 Feb 2010 12:46:36 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o14CkKtB012629; Thu, 4 Feb 2010 13:46:35 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o14CkK39012628; Thu, 4 Feb 2010 13:46:20 +0100 (CET) (envelope-from olli) Date: Thu, 4 Feb 2010 13:46:20 +0100 (CET) Message-Id: <201002041246.o14CkK39012628@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, wblock@wonkity.com, alexbestms@wwu.de, jkim@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 04 Feb 2010 13:46:35 +0100 (CET) Cc: Subject: 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, 04 Feb 2010 12:46:37 -0000 Warren Block wrote: > Oliver Fromme wrote: > > Alexander Best wrote: > > > imo this patch takes good care of the problem. would be nice to > > > have it in HEAD. > > > > No -- *Please* make sure that the disks are only spun down > > upon an actual power-off command (i.e. when reboot() is > > called with the RB_POWEROFF flag). In all other cases the > > disks should keep running. It's not good to have the disks > > spin down and then immediately spin up again on every > > reboot. > > Could you elaborate a little on why that's bad? It seems like it would > be similar to a standby/resume action. While notebook disks are usually optimized to handle a high number of start/stop cycles, this isn't true for normal desktop or server disks, especially ones that are meant for continuous operation (24/7). This varies greatly between vendors and models, though. The point is that I defintitely wouldn't want to waste a start/stop cycle when it's not necessary. Also, it would be nice to have a way to disable the STANDBY command alltogether for people who don't want it. This could easily be implemented with a sysctl. > Are there any other device drivers that differentiate the reboot and > poweroff actions that could be used as inspiration or simply shamelessly > copied in modifying ata-disk? I'm sorry, I don't know. If the ad_shutdown() function doesn't have easy access to the boot "howto" variable, maybe the information could be stored in a kenv variable? Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd I suggested holding a "Python Object Oriented Programming Seminar", but the acronym was unpopular. -- Joseph Strout