From owner-freebsd-stable@FreeBSD.ORG Mon May 12 03:06:47 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B3351065670 for ; Mon, 12 May 2008 03:06:47 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 65C8D8FC21 for ; Mon, 12 May 2008 03:06:47 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 531641CC033; Sun, 11 May 2008 20:06:47 -0700 (PDT) Date: Sun, 11 May 2008 20:06:47 -0700 From: Jeremy Chadwick To: jonathan@kc8onw.net Message-ID: <20080512030647.GA93725@eos.sc1.parodius.com> References: <29626.214.13.212.30.1210554531.squirrel@www.kc8onw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29626.214.13.212.30.1210554531.squirrel@www.kc8onw.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: stable@freebsd.org, sos@FreeBSD.org Subject: Re: ATA APM and NCQ support in FreeBSD atacontrol X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2008 03:06:47 -0000 On Sun, May 11, 2008 at 09:08:51PM -0400, jonathan@kc8onw.net wrote: > Has any work been done recently towards adding SATA Native Command > Queueing as well as ATA APM and acoustic management to FreeBSD? > > I found this PR (with patch) to add APM and acoustic management control to > atacontrol. The PR was opened in May 2005 has not been changed since > December 2006 and is still open. > http://www.freebsd.org/cgi/query-pr.cgi?pr=81692&cat= > > I have not been able to find much of anything on SATA NCQ in FreeBSD newer > than 2005 or 2006 does anyone know anything newer? I believe NCQ is supported, assuming that your controller is operating in AHCI mode and your disk supports NCQ. This mainly applies to Intel ICHx controllers, but there are others which support it as well. There's also NCQ support in non-AHCI drivers like hptmv(4), rr232x(4), hptrr(4), and mpt(4) with SATA disks. I do see some code that explicitly disables NCQ on some nVidia chipsets, and I believe that's because the NCQ details for the nF4 chipset are unavailable; possibly Linux has them. atacontrol, on the other hand, I believe always spits out "-" as to whether or not it's enabled. I'd have to go look at the code to be sure, but I'm guessing it just says "-" no matter what. An example: Feature Support Enable Value Vendor write cache yes yes read ahead yes yes Native Command Queuing (NCQ) yes - 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 Finally, I read a while back that NCQ on SATA does not provide a substantial improvement in overall disk I/O or under heavy load. It's not entirely marketing hype, but the benefits are like 3-4%, with added CPU utilisation. SATA TCQ is a different matter. SCSI uses TCQ, and as we all know, it works beautifully. SATA TCQ has a significantly larger queue depth than SATA NCQ (2^64 vs. 31). -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |