From owner-freebsd-current@freebsd.org Tue Jan 19 00:50:38 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F3CCA869A8 for ; Tue, 19 Jan 2016 00:50:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6AE2B1010 for ; Tue, 19 Jan 2016 00:50:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 68E2FA869A5; Tue, 19 Jan 2016 00:50:38 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E8B0A869A3 for ; Tue, 19 Jan 2016 00:50:38 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25F37100C for ; Tue, 19 Jan 2016 00:50:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by mail-pa0-x230.google.com with SMTP id uo6so427609452pac.1 for ; Mon, 18 Jan 2016 16:50:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=aEphZJJ3jxGXp3xgtnMKJ827HqY0OFgxE7fQOIiHUW0=; b=KugDHZmdP0+WIV8JCvHIzuDB0wqXLj9tnu+u/okjKDrtLB3yrMnyhyTN5VgHrhXCn9 q1s6JLVlHmZcLBLhkBHtK+6nTEvv5mk0K9eiIm8tvoQ7B09FcTHWK9IQhBsZ94n6lTD2 Eq4CfC9lchpnDi/q4hhYLxADq3m2S0b/a+V1JXRNkd/PcvN6QguaBnxGKDGxFbnC5g/Y sm5SzmhmYPVt6HDOf6gJ7YuvMu5KGgSq4Q4FNQ0jFNaBWKZmfl45/C5xNehwY0UlBZkk F70eHKZPNiC9COm5R8HuVTorpU70zidxByrWiLF0NGJAc6bMcbkqTgwoLaGvMN8Jus3e Ygjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=aEphZJJ3jxGXp3xgtnMKJ827HqY0OFgxE7fQOIiHUW0=; b=ZVC20PJ7nfWWSnL6lzaix6trifggHx0iwmKNNyQHu2V01DHEyt/zGhyEk0gwZJi6TY lSZgfUo6lrUBY2QmaeIxTeOGy6ucmqV18hy1culjIEOJqdE4rxhUd2Mnp0c0Qg+aQPfS HpjR/2fQzVDvO6pbXcCF7XJNFLvvYVEPjTj0864f2DYEe8LLEXwARVaPfJ5+upiGTmZW fScpXIMSEWF7F1WcnTgkN/VT4pau7mqwsvlhtHOhAHmkOcMZ5GnSw5HQInSI5rH0Kt4N xMq6tgmpGeZcgld6rX7hn/McdNIUArNCX0qRfzQpGy7kE4q+kDFUElT+O3xD4d/yRyuH baBg== X-Gm-Message-State: ALoCoQkbpLz7TD/DESBY11lErizX6uk+fo+2qabRRXqB1O9SsBKP+MOD29sGCzzyu69lbm2gTfNOC6wkedxxqhqG3bl+xnSEww== X-Received: by 10.66.142.201 with SMTP id ry9mr41050287pab.89.1453164637357; Mon, 18 Jan 2016 16:50:37 -0800 (PST) Received: from [100.127.145.62] ([69.53.245.26]) by smtp.gmail.com with ESMTPSA id p20sm36580169pfi.86.2016.01.18.16.50.36 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jan 2016 16:50:36 -0800 (PST) Sender: Warner Losh Subject: Re: CAM Shingled Disk support patches available Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D9B23743-1797-4D51-856D-5A96F7555BA3"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20160118223704.GA87506@mithlond.kdm.org> Date: Mon, 18 Jan 2016 16:50:34 -0800 Cc: scsi@freebsd.org, current@freebsd.org Message-Id: <349FCA2B-8346-4EC2-8459-B174FDC2CDB3@bsdimp.com> References: <20151118171309.GA3564@mithlond.kdm.org> <20160118223704.GA87506@mithlond.kdm.org> To: "Kenneth D. Merry" X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 19 Jan 2016 00:50:38 -0000 --Apple-Mail=_D9B23743-1797-4D51-856D-5A96F7555BA3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 18, 2016, at 2:37 PM, Kenneth D. Merry wrote: >=20 > I have a new set of SMR patches available. See below for the full > explanation. >=20 > 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. >=20 > So, although the ideas are similar, the probe logic is separate. >=20 > 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=E2=80=99ve 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=E2=80=99t change the size of the CCB. If the = NCQ Trim work wasn=E2=80=99t based on the I/O scheduler, I=E2=80=99d have pushed = it into head and would be happy to share code. AHCI can send it, but it turns out that LSI=E2=80=99s drivers (mpt, mps, = etc) can=E2=80=99t 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=E2=80=99t want to force a recompile of camcontrol(8). Adding it to the atacmd structure wasn=E2=80=99t so bad, and the CCB = size didn=E2=80=99t 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=E2=80=99t want to invent = something that the T-10 would later reinvent. > FreeBSD/head as of SVN revision 294105: >=20 > https://people.freebsd.org/~ken/cam_smr.head.20160118.1.txt >=20 > FreeBSD stable/10 as of SVN revision 294100: >=20 > https://people.freebsd.org/~ken/cam_smr.stable10.20160118.1.txt >=20 > Testing and comments are welcome. So having said all that, I=E2=80=99m totally open to something better. Warner --Apple-Mail=_D9B23743-1797-4D51-856D-5A96F7555BA3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----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----- --Apple-Mail=_D9B23743-1797-4D51-856D-5A96F7555BA3--