public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Sven Hugi <hugi.sven@gmail.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Subject: Re: Samsung t5 / t3 problem with ncq trim
Date: Wed, 19 Jan 2022 17:38:22 -0500	[thread overview]
Message-ID: <yq1tudzidng.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <CAFrqyV5O5u3_BsrOY_E2qfSNWfz5CS0-bymMDGPx00y-f5SezA@mail.gmail.com> (Sven Hugi's message of "Wed, 19 Jan 2022 19:59:12 +0100")


Sven,

> The 850 had a problem with ncq trim, disks randomly died and got slow
> af with linux.

The NCQ quirk does not apply in your case since the drive is attached to
Linux via UAS. The UAS-SATA bridge drive may or may not be using NCQ
when talking to the drive; we have no way of knowing or influencing that
decision, that's all internal to the drive. We only see what is
presented on its external USB interface.

I don't have a T5 so I don't know about that. But I do have a T3 and it
does not report LBPME which is the SCSI way of saying the drive supports
TRIM. So Linux isn't even going to attempt to TRIM the drive in this
configuration.

You are welcome to send the output of the following commands:

# sg_inq /dev/sdN

# sg_readcap -l /dev/sdN

# sg_vpd -p bl /dev/sdN

# sg_vpd -p lbpv /dev/sdN

for your T5 so we can see what it reports. But with respect to the
queued TRIM issue, there isn't really anything that can be done from the
Linux side since this is all internal to the device.

Had the mSATA drive been directly attached to a SATA controller and not
a UAS-to-SATA bridge things would have been different. The special
handling of the 850 in libata is meant to address the scenario where
Linux is talking to the SATA drive directly. In that configuration the
decision about whether to queue or not queue the DSM TRIM operation lies
with Linux.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2022-01-19 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 15:22 Samsung t5 / t3 problem with ncq trim Sven Hugi
2022-01-19  3:20 ` Martin K. Petersen
2022-01-19 16:06   ` Sven Hugi
2022-01-19 16:31     ` Martin K. Petersen
2022-01-19 18:59       ` Sven Hugi
2022-01-19 22:38         ` Martin K. Petersen [this message]
2022-01-19 23:02           ` Sven Hugi
2022-01-20 15:42             ` Sven Hugi
2022-01-21  2:14               ` Martin K. Petersen
2022-01-21 17:23                 ` Sven Hugi
2022-01-22  1:05                   ` Damien Le Moal
2022-02-23  8:19                     ` Sven Hugi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1tudzidng.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=hugi.sven@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox