Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 16:50:34 -0800
From:      Warner Losh <imp@bsdimp.com>
To:        "Kenneth D. Merry" <ken@freebsd.org>
Cc:        scsi@freebsd.org, current@freebsd.org
Subject:   Re: CAM Shingled Disk support patches available
Message-ID:  <349FCA2B-8346-4EC2-8459-B174FDC2CDB3@bsdimp.com>
In-Reply-To: <20160118223704.GA87506@mithlond.kdm.org>
References:  <20151118171309.GA3564@mithlond.kdm.org> <20160118223704.GA87506@mithlond.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

> On Jan 18, 2016, at 2:37 PM, Kenneth D. Merry <ken@freebsd.org> wrote:
> 
> I have a new set of SMR patches available.  See below for the full
> explanation.
> 
> The primary change here is that I have added SMR support to the ada(4)
> driver.  I spent some time considering whether to try to make the da(4) and
> ada(4) probe infrastructure somewhat common, but in the end concluded it
> would be too involved with not enough code reduction (if any) in the end.
> 
> So, although the ideas are similar, the probe logic is separate.
> 
> Note that NCQ support for SMR commands (Report Zones, Reset Write Pointer,
> etc.) for SATA protocol shingled drives isn't active.  For both the da(4)
> and ada(4) driver this is for lack of a way to plumb the ATA Auxiliary
> register down to the drive.

I’ve plumbed it down, but in a gross, kludgy way to make NCQ Trim work
where the only value in the Auxiliary register needs to be 1. It only takes
up one bit, but it doesn’t change the size of the CCB. If the NCQ Trim
work wasn’t based on the I/O scheduler, I’d have pushed it into head
and would be happy to share code.

AHCI can send it, but it turns out that LSI’s drivers (mpt, mps, etc)
can’t do it due to firmware inadequacies. The ability to send a FIS
in these firmwares looked promising, but it requires a full draining of
other requests, which kind of defeats the purpose of NCQ.

> In the ada(4) case, we need to add the register to struct ccb_ataio and
> add support in one or more of the underlying SATA drivers, e.g. ahci(4).

I believe that changes the size of the CCB, so I tried to avoid
that since I didn’t want to force a recompile of camcontrol(8).
Adding it to the atacmd structure wasn’t so bad, and the CCB size
didn’t completely change. The problem was that the atacmd changed
size and pushed all the other fields.

> In the da(4) case, it will require an update of the T-10 SAT spec to
> provide a way to pass the Auxiliary register down via the SCSI ATA
> PASS-THROUGH command, and then a subsquent update of the SAT layer in
> various vendors' SAS controller firmware.  At that point, there may be
> an official mapping of the SCSI ZBC commands to the ATA ZAC commands, and
> we may be able to just issue the SCSI version of the commands instead of
> composing ATA commands in the da(4) driver.  (We'll still need to keep the
> ATA passthrough version for a while at least to support controllers that
> don't have the updated translation code.)

I looked to implement things here, but didn’t want to invent something that
the T-10 would later reinvent.

> FreeBSD/head as of SVN revision 294105:
> 
> https://people.freebsd.org/~ken/cam_smr.head.20160118.1.txt
> 
> FreeBSD stable/10 as of SVN revision 294100:
> 
> https://people.freebsd.org/~ken/cam_smr.stable10.20160118.1.txt
> 
> Testing and comments are welcome.

So having said all that, I’m totally open to something better.

Warner


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWnYhbAAoJEGwc0Sh9sBEA8twQANJz9qBAsb9LsDw9OAD2j0YG
9/AICl2TX2KEYtVEjobIPzNGtAlsQVNzGquP7SrC6KXLwr6QJb7S92tUpQJczC+I
JMx2/ggiA7jlzURlNOjaJCPaBTIMsgtG5RKQWebvElS6K9Iigm25DlbNcL/3b7VR
0WGRGSSmznomtYd8c6IEr3AjzMZlpiLF8Oqsftd080Sd+GpTCj6bEZfIbB++IUSW
MxlufkbeWR2nq/LalFoJOTvX7zSOyZ68+1SDawz2A9RgugLkpa1TAdINEDJ0YlqJ
9qr5RJr05tPNnuDyJIeQWrReYBEUqasYefG3TEg3s73DIvvDMPfsWs6ablcKOjYV
FXMozxVUHX94/WToMjYzZ65bFuDQv5U7SzF2Pl9KGg2aRpHrudkI8luFPEg6yVCU
aHB8Jder83bp0UN1Ta+MPpVwiyq7JPlys4Bco2Bk7p2peR2hkjKIDQMtuOrKNPQB
Hn3pgyUu5HfBXRPd3xtIDvBx68G0ezc84MXJZPf+BBffIBI4HKK7bCMMc5NJv74/
+u5eiSumhlPibETKiYChjSvZxUc3EQHv5Q8qYquXu81mxRAuWTIQbD6zkYz8nZOc
0rD70Acm/y8wTPjdik4b2TnYw8i0WqY25u0zBwXzILGa8lR6SrWbB/l8g52ZnDWE
t4FbBBXkx8V2MaUh2/TM
=xUcY
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?349FCA2B-8346-4EC2-8459-B174FDC2CDB3>