From owner-freebsd-current@FreeBSD.ORG Thu Mar 26 12:53:08 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 545E3106566B for ; Thu, 26 Mar 2009 12:53:08 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 102638FC18 for ; Thu, 26 Mar 2009 12:53:08 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:34d0:c0e4:cf1a:3731] (unknown [IPv6:2001:7b8:3a7:0:34d0:c0e4:cf1a:3731]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E8D395C43; Thu, 26 Mar 2009 13:53:06 +0100 (CET) Message-ID: <49CB7AB1.6010704@andric.com> Date: Thu, 26 Mar 2009 13:53:05 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b4pre) Gecko/20090324 Shredder/3.0b3pre MIME-Version: 1.0 To: Peter Jeremy References: <49BE7C5A.2080103@icyb.net.ua> <10611.1237233778@critter.freebsd.dk> <20090320074833.67d615e2@gluon> <49C37B75.5060905@andric.com> <20090320191938.25d85caa@gluon> <20090326085449.GB56137@server.vk2pj.dyndns.org> In-Reply-To: <20090326085449.GB56137@server.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Bruce Cran , freebsd-current@freebsd.org 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: Thu, 26 Mar 2009 12:53:08 -0000 On 2009-03-26 09:54, Peter Jeremy wrote: > On 2009-Mar-20 19:19:38 +0000, Bruce Cran wrote: >> 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. > > This code is no worse than installing sysutils/ataidle - which also > bypasses the driver. In the case of this particular patch, it only enables adjusting the harddisk's APM and Acoustic Management settings. These should have no influence on the ATA driver. Most (notebook) disks will internally spin down and up anyway, if APM is enabled by default in the factory, and there's not much the ATA driver can do about it. Same for Acoustic Management, this apparently lets it make more or less noise, having nothing to do with the driver. Would it really be necessary to move this userspace piece of code into the kernel? I guess I could patch it so the whole ATA request stuff goes into the ATA driver itself, but what do you gain by doing this? More complexity in the ATA driver? :)