From owner-freebsd-current@FreeBSD.ORG Wed Nov 18 16:59:30 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 87BC2106566C for ; Wed, 18 Nov 2009 16:59:30 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 43DE18FC0C for ; Wed, 18 Nov 2009 16:59:30 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1NAnsP-0008VY-3T for freebsd-current@freebsd.org; Wed, 18 Nov 2009 17:59:29 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Nov 2009 17:59:29 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Nov 2009 17:59:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Wed, 18 Nov 2009 17:59:15 +0100 Lines: 30 Message-ID: References: <20091119004651.7432a6e4.nork@FreeBSD.org> <4B042304.8060807@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.23 (X11/20090928) In-Reply-To: <4B042304.8060807@FreeBSD.org> Sender: news Subject: Re: How do I use NCQ of Intel X25-E(SSD) on ahci(4)? 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: Wed, 18 Nov 2009 16:59:30 -0000 Alexander Motin wrote: > Hi. > > Norikatsu Shigemura wrote: >> I have a Intel 64GB SSD(X25-E) and a Western Digital Caviar Green >> 1TB HDD (WD10EADS), and use them on ahci(4). ahci(4) can use NCQ >> of WD10EADS, but doesn't use NCQ of X25-E. >> >> # camcontrol identify ada0 >> pass0: ATA/ATAPI-7 SATA 2.x device >> pass0: 300.000MB/s transfers >> >> Native Command Queuing (NCQ) yes 30/0x1E > > Here is the reason ^^^ > > This drive support less tags (31) then your AHCI controller does (32). > Support for such case is not implemented yet. As temporary solution you > may limit controller to use only 31 tag, then NCQ will be used. All you > need is to go to ahci.c and change line > ch->numslots = ...; > to > ch->numslots = min(31, ...); I know next to nothing about AHCI and drivers so this might be obviously wrong but wouldn't a quick (i.e. MFC-able) obvious temporary fix be to say numslots = min(get_minimum_tags_of_all_drives(), ...) ?