From ccd723900c0b9504ba6263e7e9d4cdb73a234751 Mon Sep 17 00:00:00 2001 From: Bill Pijewski Date: Wed, 17 Jul 2013 14:25:09 -0700 Subject: OS-2377 Make zfs-io-priority 0 mean that zone isn't subject to I/O throttling Reviewed by: Jerry Jelinek --- usr/src/lib/libzonecfg/common/libzonecfg.c | 2 +- usr/src/uts/common/fs/zfs/zfs_zone.c | 9 ++++++++- 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 @@ -893,6 +893,13 @@ zfs_zone_io_throttle(zfs_zone_iop_type_t type) if (!zfs_zone_delay_enable) 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 -- cgit v1.2.3