ATA Command Priority Support For The Linux 4.10 Kernel
The libata updates for the Linux 4.10 kernel brings support for ATA Command Priorities, but it's a feature disabled by default.
Tejun Heo mailed in the 4.10 libata changes. What make the libata code in Linux 4.10 worth noting is the ATA Command Priorities support.
This work allows supporting NCQ command priorities, assuming it's supported by the underlying device. These patches for the Linux kernel were worked on by a Western Digital developer, Adam Manzanares. The NCQ priority support is outlined in this ATA/ATAPI command set documentation from 2013.
The priority modes include normal priority, isochronous deadline-dependent priority, and a high priority. The high priority mode signifies that there should be an "attempt to provide better quality of service for the command. The device should complete high priority requests in a more timely fashion than normal and isochronous requests." The NCQ command priorities is just supported by newer storage drives.
Developer Adam Manzanares explained in an earlier version of these patches more about this ATA Command Priorities work:
Going from two seconds down to 72ms is exciting with this change on a supported drive. The command priority support is disabled by default but with a supported drive can be enabled via enable_prio on sysfs. Linux 4.10 is looking so far like we should be seeing a fair amount of Linux storage improvements from this to the block code to file-system work like the several additions to F2FS.
Tejun Heo mailed in the 4.10 libata changes. What make the libata code in Linux 4.10 worth noting is the ATA Command Priorities support.
This work allows supporting NCQ command priorities, assuming it's supported by the underlying device. These patches for the Linux kernel were worked on by a Western Digital developer, Adam Manzanares. The NCQ priority support is outlined in this ATA/ATAPI command set documentation from 2013.
The priority modes include normal priority, isochronous deadline-dependent priority, and a high priority. The high priority mode signifies that there should be an "attempt to provide better quality of service for the command. The device should complete high priority requests in a more timely fashion than normal and isochronous requests." The NCQ command priorities is just supported by newer storage drives.
Developer Adam Manzanares explained in an earlier version of these patches more about this ATA Command Priorities work:
This patch builds ATA commands with high priority if the iocontext of a process is set to real time. The goal of the patch is to improve tail latencies of workloads that use higher queue depths. This requires setting the iocontext ioprio on the request when it is initialized.
This patch has been tested with an Ultrastar HE8 HDD and cuts the the p99.99 tail latency of foreground IO from 2s down to 72ms when using the deadline scheduler. This patch works independently of the scheduler so it can be used with all of the currently available request based schedulers.
Foreground IO, for the previously described results, is an async fio job submitting 4K read requests at a QD of 1 to the HDD. The foreground IO is set with the iopriority class of real time. The background workload is another fio job submitting read requests at a QD of 32 to the same HDD with default iopriority.
Going from two seconds down to 72ms is exciting with this change on a supported drive. The command priority support is disabled by default but with a supported drive can be enabled via enable_prio on sysfs. Linux 4.10 is looking so far like we should be seeing a fair amount of Linux storage improvements from this to the block code to file-system work like the several additions to F2FS.
3 Comments