From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 31 20:59:40 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 8C88B106566C for ; Sun, 31 Jan 2010 20:59:40 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay3.uni-muenster.de (ZIVM-EXRELAY3.UNI-MUENSTER.DE [128.176.192.20]) by mx1.freebsd.org (Postfix) with ESMTP id E64C28FC1D for ; Sun, 31 Jan 2010 20:59:39 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.49,378,1262559600"; d="scan'208";a="24741925" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay3.uni-muenster.de with ESMTP; 31 Jan 2010 21:59:38 +0100 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 09D8E1B0768; Sun, 31 Jan 2010 21:59:38 +0100 (CET) Date: Sun, 31 Jan 2010 21:59:37 +0100 (CET) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Warren Block , Jung-uk Kim Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org 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: Sun, 31 Jan 2010 20:59:40 -0000 imo this patch takes good care of the problem. would be nice to have it in HEAD. cheers. alex Warren Block schrieb am 2010-01-30: > On Fri, 29 Jan 2010, Jung-uk Kim wrote: > >On Friday 29 January 2010 05:38 pm, Warren Block wrote: > >I am not 100% sure but I think it should be something like the > >attached patch. > Yes, I had the two commands backwards. So let me try to summarize: > ad_shutdown uses ATA_FLUSHCACHE writes out any cached data, but does > not park the heads. At powerdown, the heads do an emergency park, > which is louder than a normal park and possibly damaging. > Adding ATA_STANDBY_IMMEDIATE after the ATA_FLUSHCACHE will park the > heads more quietly and possibly more safely. Should do no harm, at > least. > ad_spindown looks like it's meant to spin the disk down for sleep > operations, and does some higher-level things. > I suspect flushcache and standby should be as close together as > possible to avoid the chance of anything getting back into the cache > or spinning the disk back up. > Anyway, testing this use of ad_spindown inside ad_shutdown brought > back the GLINK on shutdown. > A fixed version of the earlier patch that does flushcache and then > standbyimmediate is attached. > -Warren Block * Rapid City, South Dakota USA