Keep Calm and Break Rules

Inefficient and incompatible rules
It is a truth universally acknowledged that Some of the Host Managed SMR rules are not exactly conducive to efficient I/O. Even worse, they are incompatible with current host side implementations. For example, a fresh drive with no written data will FAIL ALL read commands sent by the host as ZAC/ZBC does not allow host to read unwritten LBAs. However, this behavior impedes BIOS/OS’ attempt to read partition table/disk signature during system initialization - resulting in either boot failure or long boot time (waiting for retries and timeouts).

Feedback and assumptions
These situations occur when storage vendors we attempt to define protocols and heuristics without adequate and timely host side validation. By the time host side feedbacks are considered - firmware and hardware implementations have already ossified. Furthermore, sometimes storage standard authors arrogantly incorrectly assume that as long as a functionality is defined (in a standard), then operating systems should have already implemented support for it (e.g. ATA sense data reporting, SCT WRITE SAME). When reality hits assumption - we are left with inefficient and incompatible implementations.


Rules are meant to be broken
Based on observations working with Host Managed SMR devices and conversations with fellow developers, here are some rules that we should consider breaking.

1. Allow read beyond zone Write Pointer, returning zeros or host specified data pattern for unwritten LBAs (similar to reading unmapped/trimmed sectors).



This will allow current system initialization procedures to function without error and simplify host side implementation.



2. Allow read/write operations to span zones.



This will eliminate the need to split I/Os along zone boundaries, thus increasing I/O efficiency and simplifying host side implementation (especially when there are multiple zone sizes).



3. Allow write commands addressed to zone starting LBA to implicitly reset zone Write Pointer.

State of zone as write command is issued


State of zone after write command is processed


This is a potentially dangerous proposition - as a stray write could accidentally reset a zone and delete all its contents. However, this proposal will eliminate the need to send and wait for the completion of an extra reset Write Pointer command in the I/O path. Moreover, RESET WRITE POINTER EXT as defined currently in ZAC is a non-queued command, which cannot be mixed with NCQ commands (e.g. common read/write commands) without performance penalties.



4. Allow write commands to start beyond zone Write Pointer, filling gap (unwritten LBAs) with zeros or host defined data pattern.

State of zone as write command is issued


State of zone after write command is processed


This will eliminate the need for host to send unnecessary write commands just to advance the Write Pointer (so it could write to a specific LBA), leading to better performance and simpler implementation.

Conclusion
As mentioned previously - the benefits of having SMR must greatly outweigh the cost of its adoption. It is essential that storage vendors provide an easy and efficient transition path to SMR. Sometimes that means breaking some rules along the way.
Comments

Comments