aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2017-12-21 12:13:06 -0500
committerBrian Behlendorf <[email protected]>2017-12-21 09:13:06 -0800
commita8b2e30685c9214ccfd0181977540e080340df4e (patch)
treedb07450d097c27b1e3d627f8ae58387cad9d0038 /include/sys
parent993669a7bf17a26843630c547999be0b27483497 (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #6921 Closes #6926
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/arc_impl.h1
-rw-r--r--include/sys/trace_arc.h2
-rw-r--r--include/sys/vdev.h1
-rw-r--r--include/sys/zio.h2
4 files changed, 5 insertions, 1 deletions
diff --git a/include/sys/arc_impl.h b/include/sys/arc_impl.h
index e39cf6a8f..a923449d9 100644
--- a/include/sys/arc_impl.h
+++ b/include/sys/arc_impl.h
@@ -98,6 +98,7 @@ struct arc_callback {
boolean_t acb_noauth;
uint64_t acb_dsobj;
zio_t *acb_zio_dummy;
+ zio_t *acb_zio_head;
arc_callback_t *acb_next;
};
diff --git a/include/sys/trace_arc.h b/include/sys/trace_arc.h
index 74a76520d..c40b58e32 100644
--- a/include/sys/trace_arc.h
+++ b/include/sys/trace_arc.h
@@ -108,7 +108,7 @@ DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete);
DEFINE_ARC_BUF_HDR_EVENT(zfs_new_state__mru);
DEFINE_ARC_BUF_HDR_EVENT(zfs_new_state__mfu);
-DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__sync__wait__for__async);
+DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__async__upgrade__sync);
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__demand__hit__predictive__prefetch);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__hit);
DEFINE_ARC_BUF_HDR_EVENT(zfs_l2arc__miss);
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);
diff --git a/include/sys/zio.h b/include/sys/zio.h
index 1f9f48268..8beea7adf 100644
--- a/include/sys/zio.h
+++ b/include/sys/zio.h
@@ -586,6 +586,8 @@ extern void zio_vdev_io_bypass(zio_t *zio);
extern void zio_vdev_io_reissue(zio_t *zio);
extern void zio_vdev_io_redone(zio_t *zio);
+extern void zio_change_priority(zio_t *pio, zio_priority_t priority);
+
extern void zio_checksum_verified(zio_t *zio);
extern int zio_worst_error(int e1, int e2);