nortonham Looking at that link to the linux kernel, I don't see my device in there, but will obviously double check.
Linked the wrong chunck (whitelisted devices). Here you are. The Linux kernel enforces sending non-queued TRIM commands to the following devices:
/* devices that don't properly handle queued TRIM commands */
{ "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Micron_M500_*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Micron_M5[15]0_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*M550*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 860*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM |
ATA_HORKAGE_NO_NCQ_ON_ATI, },
{ "Samsung SSD 870*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM |
ATA_HORKAGE_NO_NCQ_ON_ATI, },
{ "FCCT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
It sounds like FreeBSD with ZFS is the best way to use TRIM in any of the BSD's.
I see no reason for zpool trimming not to land on NetBSD too as soon as the driver gets updated/rebased. I'm more concerned about FFSv2 though, wish the implementation received more attention (be revised and declared stable or be removed).
You mentioned drawbacks to using TRIM; are there any drawbacks to not using it?
To my amateurish understanding, TRIM preemptively tells ffs_alloc() to discard (not move to a free block before erasing) invalid data pages during garbage collection, allowing the SSD's controller to more efficiently manage the storage space available for data.
By preventing the unnecessary moving of invalid data pages before erasing unused blocks, TRIM optimizes disk space allocation and reduces the amount of P/E cycles.
This in turn results in higher write throughput (no need for read-erase-modify before writing) especially on a close to full and highly fragmented disk, lower write amplification (especially in case of misaligned sectors), and, as a side consequence, slower wearing out (prolonged lifespan).
So, to my eyes, it's not like TRIM is a totally optional and completely negligible feature. It wouldn't have been implemented on most modern operating systems otherwise.
Do you know the reason why Open doesn't have trim?
See those threads on openbsd-misc: