summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Pijewski <wdp@joyent.com>2013-07-17 14:25:09 -0700
committerBill Pijewski <wdp@joyent.com>2013-07-17 14:28:52 -0700
commitccd723900c0b9504ba6263e7e9d4cdb73a234751 (patch)
treed0dceaf932e7aaeb59672259fecdcf0860628d1b
parenta10b75ba73b72084745194b447c6efa6db5c9125 (diff)
downloadillumos-joyent-ccd723900c0b9504ba6263e7e9d4cdb73a234751.tar.gz
OS-2377 Make zfs-io-priority 0 mean that zone isn't subject to I/O throttling
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--usr/src/lib/libzonecfg/common/libzonecfg.c2
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_zone.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/lib/libzonecfg/common/libzonecfg.c b/usr/src/lib/libzonecfg/common/libzonecfg.c
index 4ce6e90a02..71da0ffb9a 100644
--- a/usr/src/lib/libzonecfg/common/libzonecfg.c
+++ b/usr/src/lib/libzonecfg/common/libzonecfg.c
@@ -187,7 +187,7 @@ static struct alias {
{ALIAS_SHARES, "zone.cpu-shares", "privileged", "none", 0},
{ALIAS_CPUCAP, "zone.cpu-cap", "privileged", "deny", 0},
{ALIAS_MAXPROCS, "zone.max-processes", "privileged", "deny", 100},
- {ALIAS_ZFSPRI, "zone.zfs-io-priority", "privileged", "none", 1},
+ {ALIAS_ZFSPRI, "zone.zfs-io-priority", "privileged", "none", 0},
{NULL, NULL, NULL, NULL, 0}
};
diff --git a/usr/src/uts/common/fs/zfs/zfs_zone.c b/usr/src/uts/common/fs/zfs/zfs_zone.c
index 6e0864c799..d6038d4fb2 100644
--- a/usr/src/uts/common/fs/zfs/zfs_zone.c
+++ b/usr/src/uts/common/fs/zfs/zfs_zone.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 2011, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
#include <sys/spa.h>
@@ -894,6 +894,13 @@ zfs_zone_io_throttle(zfs_zone_iop_type_t type)
return;
/*
+ * If the zone's I/O priority is set to zero, don't throttle that zone's
+ * operations at all.
+ */
+ if (zonep->zone_zfs_io_pri == 0)
+ return;
+
+ /*
* XXX There's a potential race here in that more than one thread may
* update the zone delays concurrently. The worst outcome is corruption
* of our data to track each zone's IO, so the algorithm may make