[lkml]   [2016]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v7 0/4] Enabling ATA Command Priorities
From: Adam Manzanares <>

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

This feature is enabled for ATA devices by setting the ata ncq_prio_enable
device attribute to 1. An ATA device is also checked to see if the device
supports per command priority.

- Run ncq prio support check when sysfs variable set (zero day bug fix)
- Fixes from TJ merged in
- Merge fix for linux-next incorporated

- Removed fusion mpt sas prio related code deletion
- Renamed ata device attribute that enables priority cmds to the device

- Updated block patch commit message to indicate the why and not the how
- Added blk_rq_set_prio function to associate request prio with ioc prio
- In init_request_from_bio use bio_prio if it is valid
- Added ata enable_prio dev attribute to sysfs to enable prioritized commands

- Removed null dereference issue in blk-core
- Renamed queue sysfs entries for clarity
- Added documentation for sysfs queue entry

- Add queue flag to set iopriority going to the request
- If queue flag set, send iopriority class to ata_build_rw_tf
- Remove redundant code in ata_ncq_prio_enabled function.

Adam Manzanares (4):
block: Add iocontext priority to request
ata: Enabling ATA Command Priorities
ata: ATA Command Priority Disabled By Default
ata: set ncq_prio_enabled iff device has support

block/blk-core.c | 4 ++-
drivers/ata/libahci.c | 1 +
drivers/ata/libata-core.c | 33 ++++++++++++++++++-
drivers/ata/libata-scsi.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++-
drivers/ata/libata.h | 3 +-
include/linux/ata.h | 6 ++++
include/linux/blkdev.h | 14 ++++++++
include/linux/libata.h | 5 +++
8 files changed, 146 insertions(+), 4 deletions(-)


 \ /
  Last update: 2016-12-06 18:19    [W:0.082 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site