diff options
author | Bill Pijewski <wdp@joyent.com> | 2011-03-10 15:33:09 -0800 |
---|---|---|
committer | Bill Pijewski <wdp@joyent.com> | 2011-03-10 15:33:09 -0800 |
commit | 91b399ae92ee5a566f507e6bae2fe499a3977d5a (patch) | |
tree | 0b31c4c5ee78adf50594fb7ab9cc432e7bc22561 /usr/src | |
parent | 276c8f63b7afbc1867df6ad71dffe5ed838ff292 (diff) | |
download | illumos-joyent-91b399ae92ee5a566f507e6bae2fe499a3977d5a.tar.gz |
OS-306 ZFS I/O throttle can delay cached reads
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/zfs/arc.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu.c | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/usr/src/uts/common/fs/zfs/arc.c b/usr/src/uts/common/fs/zfs/arc.c index a82718e8bc..78299b85a0 100644 --- a/usr/src/uts/common/fs/zfs/arc.c +++ b/usr/src/uts/common/fs/zfs/arc.c @@ -123,6 +123,7 @@ #include <sys/refcount.h> #include <sys/vdev.h> #include <sys/vdev_impl.h> +#include <sys/zfs_zone.h> #ifdef _KERNEL #include <sys/vmsystm.h> #include <vm/anon.h> @@ -2915,6 +2916,14 @@ top: rzio = zio_read(pio, spa, bp, buf->b_data, size, arc_read_done, buf, priority, zio_flags, zb); + /* + * At this point, this read I/O has already missed in the ARC + * and will be going through to the disk. The I/O throttle + * should delay this I/O if this zone is using more than its I/O + * priority allows. + */ + zfs_zone_io_throttle(ZFS_ZONE_IOP_READ, size); + if (*arc_flags & ARC_WAIT) return (zio_wait(rzio)); diff --git a/usr/src/uts/common/fs/zfs/dmu.c b/usr/src/uts/common/fs/zfs/dmu.c index 089c331200..6482972931 100644 --- a/usr/src/uts/common/fs/zfs/dmu.c +++ b/usr/src/uts/common/fs/zfs/dmu.c @@ -40,7 +40,6 @@ #include <sys/zap.h> #include <sys/zio_checksum.h> #include <sys/sa.h> -#include <sys/zfs_zone.h> #ifdef _KERNEL #include <sys/vmsystm.h> #include <sys/zfs_znode.h> @@ -960,12 +959,6 @@ dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) xuio_t *xuio = NULL; /* - * XXX There's a bug here in that I think the reader zone could be - * throttled even if all the reads are coming from the ARC. - */ - zfs_zone_io_throttle(ZFS_ZONE_IOP_READ, size); - - /* * NB: we could do this block-at-a-time, but it's nice * to be reading in parallel. */ |