]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zio.c
Support re-prioritizing asynchronous prefetches
authorTom Caputi <tcaputi@datto.com>
Thu, 21 Dec 2017 17:13:06 +0000 (12:13 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 21 Dec 2017 17:13:06 +0000 (09:13 -0800)
commita8b2e30685c9214ccfd0181977540e080340df4e
treedb07450d097c27b1e3d627f8ae58387cad9d0038
parent993669a7bf17a26843630c547999be0b27483497
Support re-prioritizing asynchronous prefetches

When sequential scrubs were merged, all calls to arc_read()
(including prefetch IOs) were given ZIO_PRIORITY_ASYNC_READ.
Unfortunately, this behaves badly with an existing issue where
prefetch IOs cannot be re-prioritized after the issue. The
result is that synchronous reads end up in the same vdev_queue
as the scrub IOs and can have (in some workloads) multiple
seconds of latency.

This patch incorporates 2 changes. The first ensures that all
scrub IOs are given ZIO_PRIORITY_SCRUB to allow the vdev_queue
code to differentiate between these I/Os and user prefetches.
Second, this patch introduces zio_change_priority() to provide
the missing capability to upgrade a zio's priority.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #6921
Closes #6926
include/sys/arc_impl.h
include/sys/trace_arc.h
include/sys/vdev.h
include/sys/zio.h
io_spa- [new file with mode: 0644]
module/zfs/arc.c
module/zfs/dsl_scan.c
module/zfs/vdev_queue.c
module/zfs/zio.c
spa_stats.io_history [new file with mode: 0644]
tests/zfs-tests/tests/perf/scripts/prefetch_io.sh