From owner-freebsd-current@FreeBSD.ORG Wed Nov 18 21:29:22 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 CBC1610656C1; Wed, 18 Nov 2009 21:29:22 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0428FC22; Wed, 18 Nov 2009 21:29:21 +0000 (UTC) Received: by fxm27 with SMTP id 27so1755962fxm.3 for ; Wed, 18 Nov 2009 13:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=TW2m6wSBJ5wyNoZjc1XKEeAFSIwpMjBJtK64dzVBQqM=; b=oHF4elBO3ZDGgZyXpvT9TygKXe6Gyf4r+m2GhXDE54o/jEmmm8DUgsG+wXyCZ+AZ/Q aB7wMPVA137pOtFZY+wZLV0LuiRTAg63+/Gny/PdhHfYsD2JUWcUgeyHJgDgfkUCuDjx lI+xTRxkFYdYULyDNG8lnn4rHUmsWiTd4RmUI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Hcczl61qV9Yb8Dsclt2PatzXd+unsZ+KsOm3XJ1koXAmicu71PGqb7GpK9mLwtDNZc DwixsN7wFGnJYgscepvPklBMiwjy7KbhRD0qjZBHnvpYzzOJQXrizOb7/h3EPC1a5D16 h7kgE9nJTQW4tLxFZQSbMWTjlzFgWGSPMN13g= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.90.209 with SMTP id e59mr1531127wef.193.1258579761276; Wed, 18 Nov 2009 13:29:21 -0800 (PST) In-Reply-To: <4B043751.7080302@FreeBSD.org> References: <4B042304.8060807@FreeBSD.org> <4B043751.7080302@FreeBSD.org> From: Ivan Voras Date: Wed, 18 Nov 2009 22:29:01 +0100 X-Google-Sender-Auth: 058f8ec6105eee43 Message-ID: <9bbcef730911181329l14ca1e79xf18a4c6f3d0b04c0@mail.gmail.com> To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD-Current 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 21:29:22 -0000 2009/11/18 Alexander Motin : > Ivan Voras wrote: >> 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(), ...) >> ? > > Problem is that SIM driver has no idea about devices capabilities, and > also doesn't have method to resize queue after attach. In SCSI case, > tags are random and only simultaneous number of request is limited, and > this is handled fine by CAM. SATA NCQ is more restrictive, allowing to > use only tags 0..(N-1). I am planning to make XPT inform SIM about > supported tags for each device, to allow SIM to use that information > while scheduling requests. I didn't do it yet, just because most of > devices able to handle all 32 tags possible on SATA. This Intel SSD is > one of rare exceptions. Ok, (still thinking about something that could be MFC-able in an emergency), how about adding a loader tunable integer instead of "32"?