Date: Wed, 3 Dec 2014 00:45:47 -0700 From: Warner Losh <imp@bsdimp.com> To: Peter Jeremy <peter@rulingia.com> Cc: arch@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk> Subject: Re: enable TRIM by default ? Message-ID: <D89BEB95-3043-4136-AC65-FE6CF2D0EC4D@bsdimp.com> In-Reply-To: <20141203071447.GC13944@server.rulingia.com> References: <89094.1417506193@critter.freebsd.dk> <20141203071447.GC13944@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_61C9C3B2-729A-4726-B384-188E8A5D59ED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 3, 2014, at 12:14 AM, Peter Jeremy <peter@rulingia.com> wrote: >=20 > On 2014-Dec-02 07:43:13 +0000, Poul-Henning Kamp <phk@phk.freebsd.dk> = wrote: >> Isn't it time that we enable TRIM by default in newfs ? >=20 > As an alternative viewpoint, I have a SSD that got severe indigestion = when > I tried to enable TRIM: > aspire kernel: ad0: TIMEOUT - CFA ERASE retrying (1 retry left) > aspire kernel: ad0: WARNING - SETFEATURES SET TRANSFER MODE taskqueue = timeout - completing request directly > aspire kernel: ata1: error issuing SETFEATURES ENABLE WCACHE command > aspire kernel: ata1: error issuing SET_MULTI command > aspire kernel: ata1: error issuing WRITE_DMA command > The kernel then went to 1 core of interrupt and wedged. Is this a SSD, or a CF card of some flavor. The CFA ERASE trim method pre-dates the much better and easier to use DSM (Data Set Trim) method that more modern SSDs use. Perhaps we can take a cue off of that? Or maybe the detection for when to use CFA ERASE is busted since it was only ever supposed to be used with CF cards... > I admit that it's about 3 years old but smartctl says it's still got = lots of > life left in it and googling suggests they are still available. >=20 > The problem is that if a SSD doesn't support TRIM, it is likely to = have all > sorts of misbehaviour if you attempt to enable TRIM. If TRIM is = enabled by > default, you need to provide a simple way to disable it if the system = can't > cope. Except that=E2=80=99s not what=E2=80=99s being proposed. Enabling TRIM = by default means turning trim on in newfs which will not turn on for drives that don=E2=80=99= t set the CANDELETE flag. IF the drive doesn=E2=80=99t advertise support for = either CFA ERASE or DSM TRIM (in the ata world), nothing changes. Three year old flash is outside its warrantee period, even if smartctl = suggests there=E2=80=99s still life in it. Warner --Apple-Mail=_61C9C3B2-729A-4726-B384-188E8A5D59ED 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 iQIcBAEBCgAGBQJUfr+rAAoJEGwc0Sh9sBEAT4oQAIXRwgOi9SR+BHhr3MwjbI0b 41XlDPGMJbaDng/rhEs/c/3KSPQmz4Wq4FIDeNoUEyIbp4Dj2KPA8cZ2cTvlEk8M XS5OOrpj19T8cg0ERRDqIzx7Ebggbey9X+Q/G9W9XBGwoh55VaCN+wSepjZ8FXzd H4nY6Fr6z5FRozrUy3d7uh0YFCzFSjJ83FGHGmvtxC19xrF9gbhvLuPbv3qGFcBz ubx2iFsB11OiRmBT63CJZJ0yE2D7JCGKFvu4TH9nHPNFMbHjZ2nSfVVBxdLlGf9c hoL/tt4CNXbO9SvaWmSf2tkKCu8hojKlePmhyfdXxzMIX03KmMm8Z+qQ06nOBzrW fOmM2CMe8SlmwIpjK16/u9mRj+Ds2D07tuEA5kQ2/XByUa18peoZdv2uP01EDtqI d5pOOdyIKBZEFiUC3lPIfgz3KtMtnF6EoTbrh5UIq102ZE6wZOr/fOovi6h/g0qb 41zKhjraUqpP97wrN7taTs1GcBmUa/CC3Kot49XPQ9LKS1YPk/HWdpimPsmUIWgp a+C3zb81m/G2u1eJ5jlhlsSVLcmitiMSeNrPKvgyf+Qv1VBFoLjipD8UgWFJrvjK L8qWwj0h3rHc0nbajmJUz+nNtC4psC8KjI+k1K7nI5wt6ZMet+aTgGjZlFaeoD90 ukMggknF8eh0Ocwl6QIP =JSbl -----END PGP SIGNATURE----- --Apple-Mail=_61C9C3B2-729A-4726-B384-188E8A5D59ED--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D89BEB95-3043-4136-AC65-FE6CF2D0EC4D>