linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Enabling ATA Command Priorities
@ 2016-10-11 20:40 Adam Manzanares
  2016-10-11 20:40 ` [PATCH v3 1/2] block: Add iocontext priority to request Adam Manzanares
  2016-10-11 20:40 ` [PATCH v3 2/2] ata: Enabling ATA Command Priorities Adam Manzanares
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Manzanares @ 2016-10-11 20:40 UTC (permalink / raw)
  To: axboe, tj; +Cc: linux-block, linux-ide, 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 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.

This feature is enabled by setting a queue flag that is exposed as a sysfs
entry named rq_ioc_prio. If this feature is enabled, and the submission 
iocontext exists, and the bio_prio is not valid then the request ioprio is
set to the iocontext prio.

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

v2:
 - 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 (2):
  block: Add iocontext priority to request
  ata: Enabling ATA Command Priorities

 Documentation/block/queue-sysfs.txt | 12 ++++++++++++
 block/blk-core.c                    |  5 +++++
 block/blk-sysfs.c                   | 32 ++++++++++++++++++++++++++++++++
 drivers/ata/libata-core.c           | 35 ++++++++++++++++++++++++++++++++++-
 drivers/ata/libata-scsi.c           | 10 +++++++++-
 drivers/ata/libata.h                |  2 +-
 include/linux/ata.h                 |  6 ++++++
 include/linux/blkdev.h              |  3 +++
 include/linux/libata.h              | 18 ++++++++++++++++++
 9 files changed, 120 insertions(+), 3 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-12 21:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 20:40 [PATCH v3 0/2] Enabling ATA Command Priorities Adam Manzanares
2016-10-11 20:40 ` [PATCH v3 1/2] block: Add iocontext priority to request Adam Manzanares
2016-10-12 14:49   ` Jens Axboe
2016-10-12 17:58     ` Adam Manzanares
2016-10-12 21:05       ` Jens Axboe
2016-10-11 20:40 ` [PATCH v3 2/2] ata: Enabling ATA Command Priorities Adam Manzanares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).