From owner-freebsd-scsi@FreeBSD.ORG Wed Jan 8 21:27:26 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6006125 for ; Wed, 8 Jan 2014 21:27:26 +0000 (UTC) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 40A2D139F for ; Wed, 8 Jan 2014 21:27:25 +0000 (UTC) Received: from r2d2 ([82.69.141.170]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50007476548.msg for ; Wed, 08 Jan 2014 21:27:23 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Wed, 08 Jan 2014 21:27:23 +0000 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.141.170 X-Return-Path: prvs=10857851f7=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-scsi@freebsd.org Message-ID: From: "Steven Hartland" To: "Garrett Wollman" References: <21197.39676.138433.937002@khavrinen.csail.mit.edu><430F34AB88D44C4BAF31DDC7AD214137@multiplay.co.uk> <21197.47504.93295.771468@khavrinen.csail.mit.edu> Subject: Re: Attempting ATA TRIM on SAS devices? Date: Wed, 8 Jan 2014 21:27:34 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2014 21:27:26 -0000 ----- Original Message ----- From: "Garrett Wollman" To: "Steven Hartland" Cc: Sent: Wednesday, January 08, 2014 8:48 PM Subject: Re: Attempting ATA TRIM on SAS devices? > < said: > >> It should only do this if your drive reports it supports >> ATA_TRIM by setting the ATA_SUPPORT_DSM_TRIM bit in the >> response to an ATA_IDENTIFY command sent to it using ATA >> passthrough. > >> What does the following report: >> camcontrol identify da12 > > It says: > > pass13: ATA-8 SATA 3.x device > pass13: 600.000MB/s transfers, Command Queueing Enabled > > protocol ATA/ATAPI-8 SATA 3.x > device model TALOS2 > firmware revision 2.25 > serial number A179E011337000251 > WWN 5e83a97a101b6024 > cylinders 16383 > heads 16 > sectors/track 63 > sector size logical 512, physical 512, offset 0 > LBA supported 468883199 sectors > LBA48 supported 468883199 sectors > PIO supported PIO4 > DMA supported WDMA2 UDMA6 > media RPM non-rotating > > Feature Support Enabled Value Vendor > read ahead yes no > write cache yes no > flush cache yes yes > overlap no > Tagged Command Queuing (TCQ) no no > Native Command Queuing (NCQ) yes 32 tags > SMART yes yes > microcode download yes yes > security yes no > power management yes yes > advanced power management yes yes 254/0xFE > automatic acoustic management no no > media status notification no no > power-up in Standby yes no > write-read-verify yes no 0/0x0 > unload yes yes > free-fall no no > Data Set Management (DSM/TRIM) yes > DSM - max 512byte blocks yes 1 > DSM - deterministic read yes any value > Host Protected Area (HPA) yes no 468883199/1 > HPA - Security no > > A very similar device (firmware 2.15 instead of 2.25) in a 9.1 system > returns no results to this command. Not sure if that's 9.1/9.2 > difference of a firmware difference. That will be 9.1 -> 9.2 differences. So as suspected your drive is reporting it supports ATA_TRIM but then refusing the command. Now the question is why? The most likely cause is a firmware bug. I know its spec says its SAS but can you plug this drive into a SATA controller such as on board Intel controller? If so does work and then it correctly support delete's? Note: The CAM SCSI layer currently prefers ATA_TRIM over UNMAP as in all tests I've done it performs better. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.