diff options
author | Alex Reece <alex@delphix.com> | 2014-07-18 07:08:31 -0800 |
---|---|---|
committer | Christopher Siden <chris@delphix.com> | 2014-07-18 08:08:31 -0700 |
commit | 73527f441cbbd953fa42cc5a30a413bad75f24a9 (patch) | |
tree | 830d59a33478dc7b358327222321dba7bc1ccdc4 /usr/src/uts/common/fs/zfs/vdev_queue.c | |
parent | bbfa8ea8bb4168c969ba27d632dfe0aeec3fc0da (diff) | |
download | illumos-joyent-73527f441cbbd953fa42cc5a30a413bad75f24a9.tar.gz |
4753 increase number of outstanding async writes when sync task is waiting
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/vdev_queue.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_queue.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_queue.c b/usr/src/uts/common/fs/zfs/vdev_queue.c index a394b80c67..561e6a4482 100644 --- a/usr/src/uts/common/fs/zfs/vdev_queue.c +++ b/usr/src/uts/common/fs/zfs/vdev_queue.c @@ -24,7 +24,7 @@ */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include <sys/zfs_context.h> @@ -350,14 +350,23 @@ vdev_queue_class_min_active(zio_priority_t p) } static int -vdev_queue_max_async_writes(uint64_t dirty) +vdev_queue_max_async_writes(spa_t *spa) { int writes; + uint64_t dirty = spa->spa_dsl_pool->dp_dirty_total; uint64_t min_bytes = zfs_dirty_data_max * zfs_vdev_async_write_active_min_dirty_percent / 100; uint64_t max_bytes = zfs_dirty_data_max * zfs_vdev_async_write_active_max_dirty_percent / 100; + /* + * Sync tasks correspond to interactive user actions. To reduce the + * execution time of those actions we push data out as fast as possible. + */ + if (spa_has_pending_synctask(spa)) { + return (zfs_vdev_async_write_max_active); + } + if (dirty < min_bytes) return (zfs_vdev_async_write_min_active); if (dirty > max_bytes) @@ -390,8 +399,7 @@ vdev_queue_class_max_active(spa_t *spa, zio_priority_t p) case ZIO_PRIORITY_ASYNC_READ: return (zfs_vdev_async_read_max_active); case ZIO_PRIORITY_ASYNC_WRITE: - return (vdev_queue_max_async_writes( - spa->spa_dsl_pool->dp_dirty_total)); + return (vdev_queue_max_async_writes(spa)); case ZIO_PRIORITY_SCRUB: return (zfs_vdev_scrub_max_active); default: |