From nobody Mon Nov 07 21:01:58 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N5kFH5g15z4gNLS for ; Mon, 7 Nov 2022 21:02:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5kFG4DsLz4Cr2 for ; Mon, 7 Nov 2022 21:02:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ed1-x535.google.com with SMTP id f7so19551151edc.6 for ; Mon, 07 Nov 2022 13:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y5bKVrEZavtsaBAa4oX+uI717O9Vozn4qBcLzWnB4wg=; b=Xk1sd5B6uuTJs8mYAZfFKLVcqQLGtGIliAJ9fSv9McKJR72+71mNcqYnUVHnU5D4pQ ifm8V6iwN55rjhxwf90plvRnXU/zlbZkxZv1hVXKw8SRhrbqQSmFso3zPLjC6oaJdFXw UbHwYt28hHHr0odB6XpxN/89kPI79zJZK0sBh2TAtaG6J6z+EfIsG4TeFbqUjYC5hZlB IQ4Y5XCLLzOwswqgI/kzv/35oeeUQG+RtBsFQbP3zCStNnPyT2A34v5fxke7w1D8d3pH Npzui7JH2JjlCSy+YxzijnbsOf0/Tdyv13gXd9R3/8VCtV4tbKqGOBt7IvxGV8YTMTnj 4XaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y5bKVrEZavtsaBAa4oX+uI717O9Vozn4qBcLzWnB4wg=; b=BPt7tb5X8Ys57snpjfiQ2AIA487c93EBAcderzJBQC1e5D768clpWIPui55iiwfdYR YL5eYiC11NkO/WddehUlpX+ypcRCXVpSWSK8ZEjPL8y7dLqFZidEeEaVQWqQvBYJ27l4 nt16WTJ3iIk04vHj97Bqqm7mrywKYm/YzMIgjt4Lj8Llyun+RY/kyJ1ed5Xtes549NpT BeZltODJfPCzmkWhasIjfYQrr+nm9qlgTcJ9oerRwlof5iBgvZhLOoq/zK3Z4Jv9bwaA B3Y7qLdAW0S45OQ4Y8poELtjCJovgdMoMo622jX5kyfrDRXiQ39M+dhfrdOjsW/R75Kw U5pw== X-Gm-Message-State: ANoB5pmfqDXJxhUFBGlhxPqJkEPUoxlJWjXrWswlM2Z5gmmPm1HjisUi /zFdXLFo8rs0vS/aSLaAHoP/Z0o7RJfnGw3TFo5G/yWzxLE= X-Google-Smtp-Source: AA0mqf7x3K9GonhUjqAlx+SzpCIWjBmNgWsT4LsdrzNET1jHJNh/hsC33qFG0HfrIXgg0En6zFZouecJYewv2frsJfg= X-Received: by 2002:a50:9e42:0:b0:466:94e3:5ec9 with SMTP id z60-20020a509e42000000b0046694e35ec9mr1866886ede.173.1667854929055; Mon, 07 Nov 2022 13:02:09 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <8a5a1943-6b3-92fd-17c-473c5b13436@puchar.net> <16589dc-a890-579-c523-db92be5335ce@puchar.net> In-Reply-To: <16589dc-a890-579-c523-db92be5335ce@puchar.net> From: Warner Losh Date: Mon, 7 Nov 2022 14:01:58 -0700 Message-ID: Subject: Re: SSD - trim fails To: Wojciech Puchar Cc: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000095693605ece7bc26" X-Rspamd-Queue-Id: 4N5kFG4DsLz4Cr2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=Xk1sd5B6; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::535) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.981]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::535:from]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000095693605ece7bc26 Content-Type: text/plain; charset="UTF-8" On Sun, Nov 6, 2022 at 3:44 PM Wojciech Puchar wrote: > > Next, maybe the drive is lying the size of the DSM it will support, but > again, this is a weird > > message to report a request that's too long with. > > > > Maybe it doesn't support queued DSM, despite all appearances to the > contrary from its > > identify tables. Try setting the trem method to DSM_TRIM: > > # sysctl kern.cam.ada.0.delete_method=DSM_TRIM > > should do the trick. At the very least, that will change the command we > send so if it can't > > > this works. but not from /boot/loader.conf > i put it in /etc/rc at beginning so it for sure is done before doing first > trim. > Can you file a bug for this? Also, I'm thinking that maybe this should be the default for these drives, so if you could send me a camcontrol identify for it? Warner --00000000000095693605ece7bc26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Nov 6, 2022 at 3:44 PM Wojcie= ch Puchar <wojtek@puchar.net>= ; wrote:
> Ne= xt, maybe the drive is lying the size of the DSM it will support, but again= , this is a weird
> message to report a request that's too long with.
>
> Maybe it doesn't support queued DSM, despite all appearances to th= e contrary from its
> identify tables. Try setting the trem method to DSM_TRIM:
> # sysctl kern.cam.ada.0.delete_method=3DDSM_TRIM
> should do the trick. At the very least, that will change the command w= e send so if it can't


this works. but not from /boot/loader.conf
i put it in /etc/rc at beginning so it for sure is done before doing first =
trim.

Can you file a bug for this?

Also, I'm thinking that maybe this should be the d= efault for these drives, so if you could
send me a camcontrol ide= ntify for=C2=A0 it?

Warner=C2=A0
--00000000000095693605ece7bc26--