diff mbox

Samsung SSD 850Pro firmware update queued TRIM problems

Message ID 54EB35EF.2050103@zahlenfresser.de
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Stefan Keller Feb. 23, 2015, 2:15 p.m. UTC
Hello list,

I recently updated the firmware on my Samsung 850 Pro from EXM01B6Q to
EXM02B6Q.
Now "fstrim -v /" causes SATA command timeouts related to TRIM with NCQ.
This used to work before the firmware update and seems to be a
regression with the newer firmware.
I patched libata to allow me to specify a force option to enable the
NO_NCQ_TRIM horkage. With such an option set on the command line, fstrim
and normal operation work just fine.
Attached is a syslog excerpt showing the timeouts. Also my small patch
for libata force parameters.
I suggest to blacklist NCQ TRIM for this Samsung SSD and firmware:

Device Model:     Samsung SSD 850 PRO 1TB
Firmware Version: EXM02B6Q

Other SSD sizes are probably also affected.

Also, I would suggest to add a patch similar to the one attached to
allow a user to quickly disable NCQ TRIM and also enable it for a
blacklisted one (may be useful for testing, new firmware versions etc.).

Best regards,
Stefan

Comments

Martin K. Petersen Feb. 24, 2015, 6:36 p.m. UTC | #1
>>>>> "Stefan" == Stefan Keller <linux-list@zahlenfresser.de> writes:

Stefan> Hello list, I recently updated the firmware on my Samsung 850
Stefan> Pro from EXM01B6Q to EXM02B6Q.  Now "fstrim -v /" causes SATA
Stefan> command timeouts related to TRIM with NCQ.

Do these timeouts happen if you disable ALPM?
Stefan Keller Feb. 24, 2015, 9:12 p.m. UTC | #2
Hello Martin,

On 02/24/2015 07:36 PM, Martin K. Petersen wrote:
>>>>>> "Stefan" == Stefan Keller <linux-list@zahlenfresser.de> writes:
> 
> Stefan> Hello list, I recently updated the firmware on my Samsung 850
> Stefan> Pro from EXM01B6Q to EXM02B6Q.  Now "fstrim -v /" causes SATA
> Stefan> command timeouts related to TRIM with NCQ.
> 
> Do these timeouts happen if you disable ALPM?

Yes.
cat /sys/class/scsi_host/host*/link_power_management_policy
max_performance
max_performance
max_performance
max_performance
max_performance
max_performance

Still timeouts (actually I think when I initially got them I was
connected to power, which in my setup means ALPM disabled). Also the
timeouts only happen with TRIM, not with any other heavy I/O.

Best regards,
Stefan
Martin K. Petersen Feb. 25, 2015, 10:15 p.m. UTC | #3
>>>>> "Stefan" == Stefan Keller <linux-list@zahlenfresser.de> writes:

Stefan> Hello list, I recently updated the firmware on my Samsung 850
Stefan> Pro from EXM01B6Q to EXM02B6Q.  Now "fstrim -v /" causes SATA
Stefan> command timeouts related to TRIM with NCQ.
>> 
>> Do these timeouts happen if you disable ALPM?

Stefan> Yes.

Bummer. The only good data point we have wrt. queued TRIM problems is
that things only appear to fail when ALPM is enabled. Things are working
fine for me on all the systems in the lab, however, and I have never
been able to reproduce any of the issues reported.

I don't have any 850 drives but will try to get one. For now we should
blacklist queued trim on those.
dimitrios tranoudakis Feb. 26, 2015, 10:13 a.m. UTC | #4
hello Stefan ,,,My name is Dimitrios,. I have problem with the new firmware 
of Samsung 850 pro. As hundreds other users my ssd is dead after the 
firmware update. I tried everything under Linux as gparted, secure erase 
with dd tool and hdparm. seems that remains locked nad get errors all the 
time...have you any idea to unlockit??? it would help many of us with dead 
ssd's.
thanks in advance!
friendly Dimitrios from Athens Greece




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Bourne March 29, 2015, 10 a.m. UTC | #5
Martin K. Petersen <martin.petersen <at> oracle.com> writes:

> 
> >>>>> "Stefan" == Stefan Keller <linux-list <at> zahlenfresser.de> writes:
> 
> Stefan> Hello list, I recently updated the firmware on my Samsung 850
> Stefan> Pro from EXM01B6Q to EXM02B6Q.  Now "fstrim -v /" causes SATA
> Stefan> command timeouts related to TRIM with NCQ.
> >> 
> >> Do these timeouts happen if you disable ALPM?
> 
> Stefan> Yes.
> 
> Bummer. The only good data point we have wrt. queued TRIM problems is
> that things only appear to fail when ALPM is enabled. Things are working
> fine for me on all the systems in the lab, however, and I have never
> been able to reproduce any of the issues reported.
> 
> I don't have any 850 drives but will try to get one. For now we should
> blacklist queued trim on those.
> 


Another data point: I have the same problem, but on a 256 pro. Same firmware
(EXM02B6Q from factory), with ALPM disabled.

Regards,

Simon


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 485f7ea..1167bc9 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6508,6 +6508,8 @@  static int __init ata_parse_force_one(char **cur,
 		{ "rstonce",	.lflags		= ATA_LFLAG_RST_ONCE },
 		{ "atapi_dmadir", .horkage_on	= ATA_HORKAGE_ATAPI_DMADIR },
 		{ "disable",	.horkage_on	= ATA_HORKAGE_DISABLE },
+		{ "noqtrim",	.horkage_on	= ATA_HORKAGE_NO_NCQ_TRIM },
+		{ "qtrim",	.horkage_off	= ATA_HORKAGE_NO_NCQ_TRIM },
 	};
 	char *start = *cur, *p = *cur;
 	char *id, *val, *endp;