Re: Feature Request: Device Manager Fake Trim / Zero Trim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/9/23 15:15, Hannes Reinecke wrote:
> On 10/9/23 02:56, charlesfdotz@xxxxxxxxxxxx wrote:
>> Hello,
>> 
>> I would like to request a new device manager layer be added that accepts
>> trim requests for sectors and instead writes zeros to those sectors.
>> 
>> This would be useful to deal with SMR (shingled magnetic recording) drives
>> that do not support trim. Currently after an SMR drive has had enough data
>> written to it the performance drops dramatically because the disk must 
>> shuffle around data as if it were full and without trim support there is no
>> way to inform the disk which sectors are no longer used. Currently there's
>> no way to "fix" or reset this without doing an ATA secure erase despite 
>> many of these disk being sold without informing customers that they were
>> SMR drives (western digital was sued for selling SMR drives as NAS
>> drives).
>> 
> Gosh, no, please don't. SMR drives have a write pointer, and if the zone
> needs to be reset you just reset the write pointer. Writing zeroes will
> result in the opposite; the zone continues to be full, and no writes can
> happen there.

Yes. And zone reset *is* a trim also since after a zone reset, the sectors in
the zone cannot be read.

> Which drive is this?

>From reading the description of the "issue", it seems that this is related to
drive managed SMR disks, which may or may not be detectable from the host (if
the drive is honest and reports it, the scsi_disk zoned_cap attribute will say
"drive-managed"). So no zone reset for a drive managed SMR disk since they are
"normal" drives from the interface perspective.

A drive managed SMR disk may or may not benefit from TRIM. That completely
depends on the device internal implementation to handle the SMR constraint. If
the drive does not have trim/discard support, it is likely because that serves
no purpose or would be useless performance-wise...

-- 
Damien Le Moal
Western Digital Research





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux