From owner-freebsd-arch@FreeBSD.ORG Wed Dec 3 07:45:57 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 ED367C42 for ; Wed, 3 Dec 2014 07:45:57 +0000 (UTC) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC7E3BF4 for ; Wed, 3 Dec 2014 07:45:57 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id g10so14947807pdj.37 for ; Tue, 02 Dec 2014 23:45:51 -0800 (PST) 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=K9J5T6nVmX4Ikw0xNREuTbpCVON1GBuwfA2ghQ9PI/U=; b=YWkvRQ6TykVBG+0ZfG8wl8jSsGO+kNvRV4weqj5A0CTq/PVgGKw76J/i5cOW9Sb+9r Ffp7+IUEbjt0zZCN1/H00R8ghkVp/U9zueiohUaVD0g5f8R+g0omOvVXxMyVJjL8U5Tl URVtLVucQRgRl5jZiwhcUzNlHZ+NxWuw/5VRahsIWmy7Re8gUCTAS/0eFbGesIV1u3cX isdR834wh84HcgMY8aE8D/SvzoDRKdi8dzNHTGxXhL+8ulTJYygrQ+hp9BYCLzIPIM8T AijBlJLcRKNmRKvtJJDEJv7ORmoxVWXE1D5/kLAKPW/k2sra0SdvQ0teDfF9eMX1lSYj ohbg== X-Gm-Message-State: ALoCoQkdql2kKddC4MiJXwubDOqPUvuJfGZCEssHqDQ5BHmp+vAjAONUcDzLyUpz/ybgTA+DmulM X-Received: by 10.70.103.141 with SMTP id fw13mr6157954pdb.148.1417592751138; Tue, 02 Dec 2014 23:45:51 -0800 (PST) Received: from [10.64.24.134] ([69.53.236.236]) by mx.google.com with ESMTPSA id c9sm22253939pdn.81.2014.12.02.23.45.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Dec 2014 23:45:50 -0800 (PST) Sender: Warner Losh Subject: Re: enable TRIM by default ? Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_61C9C3B2-729A-4726-B384-188E8A5D59ED"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20141203071447.GC13944@server.rulingia.com> Date: Wed, 3 Dec 2014 00:45:47 -0700 Message-Id: References: <89094.1417506193@critter.freebsd.dk> <20141203071447.GC13944@server.rulingia.com> To: Peter Jeremy X-Mailer: Apple Mail (2.1993) 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 07:45:58 -0000 --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 wrote: >=20 > On 2014-Dec-02 07:43:13 +0000, Poul-Henning Kamp = 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--