From owner-freebsd-arch@FreeBSD.ORG Wed Dec 3 08:35:07 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FE125D8 for ; Wed, 3 Dec 2014 08:35:07 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps.rulingia.com", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B358ED7 for ; Wed, 3 Dec 2014 08:35:05 +0000 (UTC) Received: from server.rulingia.com (c220-239-242-83.belrs5.nsw.optusnet.com.au [220.239.242.83]) by vps.rulingia.com (8.14.9/8.14.9) with ESMTP id sB38Yooq024607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Dec 2014 19:34:55 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.9/8.14.9) with ESMTP id sB38YjRP080724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Dec 2014 19:34:45 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.9/8.14.9/Submit) id sB38Yi0D080723; Wed, 3 Dec 2014 19:34:44 +1100 (EST) (envelope-from peter) Date: Wed, 3 Dec 2014 19:34:44 +1100 From: Peter Jeremy To: Warner Losh Subject: Re: enable TRIM by default ? Message-ID: <20141203083444.GD13944@server.rulingia.com> References: <89094.1417506193@critter.freebsd.dk> <20141203071447.GC13944@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.23 (2014-03-12) Cc: arch@freebsd.org, Poul-Henning Kamp X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 08:35:07 -0000 --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2014-Dec-03 00:45:47 -0700, Warner Losh wrote: > >> On Dec 3, 2014, at 12:14 AM, Peter Jeremy wrote: >>=20 >> On 2014-Dec-02 07:43:13 +0000, Poul-Henning Kamp wr= ote: >>> 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 wh= en >> I tried to enable TRIM: >> aspire kernel: ad0: TIMEOUT - CFA ERASE retrying (1 retry left) >> aspire kernel: ad0: WARNING - SETFEATURES SET TRANSFER MODE taskqueue ti= meout - 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... It's a Super Talent FEM16GF13M - which describes itself as a SSD and has a PATA interface. That trial was ~3 years ago and so probably on 8.x. >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= =99t 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. That sounds OK. If a drive advertises that is supports TRIM, it should be safe to enable it. I was concerned that it would force TRIM on. --=20 Peter Jeremy --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUfsskXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0DKwP/2z9djPTQSO2Cb/+xwDiC/pC nKYdU/lTHkiBah3pql/gTCR2ZsrWYnJvt00Y3w2OC3HyNjFq/Y34r3tTon85piqa 6A6HtMNoC6c/zXF+JBMZEUCEEULUPJEBAjo43+LAYpa/CtWGYE3X24AbIPcmtCoE Vx8ykz7fAPUXX8aOm3RXHjJ5fSU8XcDQxLsUlpoDElgkr28pciBz1zwWFsIRGhFB LAfYBocotBJgQCn2M6HK0U5h9Y1wAxqGUTekm4BpmB/AOHZGGdRUvljVVtiWteFN jDSzxHM6HuYPYlUqjj2HrqrndizB0CVdEdmNQ0xwoeqns+RjWopMt0Qs8BhukttO tGIF68SFUxRFKxR4BEug9+ds/egSQ6W0zVJQvEOqiS8Od+ijZvWJdf4+/tqEbqKF OWd2ztRU2Xs0i/3xrjRiinW3+/HgREX6xUhOmfzcxadqZyRpMfN/becp/D/JX+NM zTbJzFXeH06luR2/KvSWZlkyoiiAwNqHXmS0leAjpVaD+8BWXBY1PLh8FfHZjvnE 3y7QGvqXnVGCibIIVg/7rQisH0MYR1kVAigH1uQndTzCuYP62sm9j/cjXbdR88Wx IhK5PrXNr00b9Q9vvWppSHKIrC4+SJlAA+siANtieOt9/a/PD/p0ApCCiynR54ay r/p+GXjjgTWHVs/83AuU =74zt -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye--