From a8b2e30685c9214ccfd0181977540e080340df4e Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Thu, 21 Dec 2017 12:13:06 -0500 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #6921 Closes #6926 --- include/sys/vdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sys/vdev.h') diff --git a/include/sys/vdev.h b/include/sys/vdev.h index 473d2691c..bc2f4f0ea 100644 --- a/include/sys/vdev.h +++ b/include/sys/vdev.h @@ -123,6 +123,7 @@ extern void vdev_queue_init(vdev_t *vd); extern void vdev_queue_fini(vdev_t *vd); extern zio_t *vdev_queue_io(zio_t *zio); extern void vdev_queue_io_done(zio_t *zio); +extern void vdev_queue_change_io_priority(zio_t *zio, zio_priority_t priority); extern int vdev_queue_length(vdev_t *vd); extern uint64_t vdev_queue_last_offset(vdev_t *vd); -- cgit v1.2.3