Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2013 23:58:23 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "matt" <sendtomatt@gmail.com>, <freebsd-current@FreeBSD.org>
Subject:   Re: r249939+ not detecting ata trim
Message-ID:  <37582339ED1A4356B6DE6142B2FBCD7B@multiplay.co.uk>
References:  <517C3C87.1020005@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0346_01CE43A3.1A0309A0
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit


----- Original Message ----- 
From: "matt" <sendtomatt@gmail.com>
To: <freebsd-current@FreeBSD.org>
Sent: Saturday, April 27, 2013 10:00 PM
Subject: r249939+ not detecting ata trim


>I had been updating/porting Steve Hartland's patches for zfs trim on mps
> for 8.3 stable.
> Trim was working fine for me before r249939.
> 
> When I saw that this functionality was being added to current, I built
> world/kernel without the patches.
> Indeed, many of the commits are quite similar to the updated patch I
> worked on (patch claims most of it is 'already applied').
> 
> HOWEVER, I am not seeing a delete method detected for either of my
> Samsung 830s, which I did under my updated patch.
> It looks like scsi ata identify is not working.
> 
> Are there still outstanding commits to enable this, or is something now
> a tunable/sysctl I'm missing?
> 
> Previously it was working:
> kstat.zfs.misc.zio_trim.bytes: 47546368
> kstat.zfs.misc.zio_trim.success: 2618
> kstat.zfs.misc.zio_trim.unsupported: 0
> kstat.zfs.misc.zio_trim.failed: 0
> 
> 
> Current:
> kstat.zfs.misc.zio_trim.bytes: 0
> kstat.zfs.misc.zio_trim.success: 0
> kstat.zfs.misc.zio_trim.unsupported: 264
> kstat.zfs.misc.zio_trim.failed: 0
> kern.cam.da.3.delete_method: NONE
> kern.cam.da.3.delete_max: 0
> kern.cam.da.4.delete_method: NONE
> kern.cam.da.4.delete_max: 0

I have one patch outstanding (attached) to enable ATA_TRIM support under
controllers which don't support UNMAP, I was just finalising testing on
this, which I completed this morning; I'm just waiting for approval.

If your controller doesn't support UNMAP then this will be the reason,
however mps should support this.

Could you confirm if previously you where seeing UNMAP as the reported
delete_method?

    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.
------=_NextPart_000_0346_01CE43A3.1A0309A0
Content-Type: application/octet-stream;
	name="cam-enable-trim.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="cam-enable-trim.patch"

Enable ATA TRIM support choice by autodetection and correct method names =
after=0A=
increasing the priority of ATA TRIM=0A=
Index: sys/cam/scsi/scsi_da.c=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- sys/cam/scsi/scsi_da.c	(revision 249941)=0A=
+++ sys/cam/scsi/scsi_da.c	(working copy)=0A=
@@ -133,14 +133,14 @@=0A=
 	DA_DELETE_WS16,=0A=
 	DA_DELETE_WS10,=0A=
 	DA_DELETE_ZERO,=0A=
-	DA_DELETE_MIN =3D DA_DELETE_UNMAP,=0A=
+	DA_DELETE_MIN =3D DA_DELETE_ATA_TRIM,=0A=
 	DA_DELETE_MAX =3D DA_DELETE_ZERO=0A=
 } da_delete_methods;=0A=
 =0A=
 static const char *da_delete_method_names[] =3D=0A=
-    { "NONE", "DISABLE", "UNMAP", "ATA_TRIM", "WS16", "WS10", "ZERO" };=0A=
+    { "NONE", "DISABLE", "ATA_TRIM", "UNMAP", "WS16", "WS10", "ZERO" };=0A=
 static const char *da_delete_method_desc[] =3D=0A=
-    { "NONE", "DISABLED", "UNMAP", "ATA TRIM", "WRITE SAME(16) with =
UNMAP",=0A=
+    { "NONE", "DISABLED", "ATA TRIM", "UNMAP", "WRITE SAME(16) with =
UNMAP",=0A=
       "WRITE SAME(10) with UNMAP", "ZERO" };=0A=
 =0A=
 /* Offsets into our private area for storing information */=0A=

------=_NextPart_000_0346_01CE43A3.1A0309A0--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37582339ED1A4356B6DE6142B2FBCD7B>