summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-08-10 06:10:21 +0000
committerdelphij <delphij@FreeBSD.org>2014-08-10 06:10:21 +0000
commit9e60670e2a9e4a80160e910ef0d5529d9a835793 (patch)
treede52c216a0b0a46cb1f6c7ac0230dae0116f0107 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
parentc14fd95fbce4723cad57b71f8e79384531937540 (diff)
downloadFreeBSD-src-9e60670e2a9e4a80160e910ef0d5529d9a835793.zip
FreeBSD-src-9e60670e2a9e4a80160e910ef0d5529d9a835793.tar.gz
MFC r269138:
Add two sysctls for newly added tunables.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
index 5639dd4..2fe067b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
@@ -117,6 +117,12 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_noalloc_threshold, CTLFLAG_RWTUN,
* class have also crossed this threshold.
*/
int zfs_mg_fragmentation_threshold = 85;
+TUNABLE_INT("vfs.zfs.mg_fragmentation_threshold", &zfs_mg_fragmentation_threshold);
+SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_fragmentation_threshold, CTLFLAG_RWTUN,
+ &zfs_mg_fragmentation_threshold, 0,
+ "Percentage of metaslab group size that should be considered "
+ "eligible for allocations unless all metaslab groups within the metaslab class "
+ "have also crossed this threshold");
/*
* Allow metaslabs to keep their active state as long as their fragmentation
@@ -125,6 +131,11 @@ int zfs_mg_fragmentation_threshold = 85;
* status allowing better metaslabs to be selected.
*/
int zfs_metaslab_fragmentation_threshold = 70;
+TUNABLE_INT("vfs.zfs.metaslab.fragmentation_threshold",
+ &zfs_metaslab_fragmentation_threshold);
+SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, fragmentation_threshold, CTLFLAG_RWTUN,
+ &zfs_metaslab_fragmentation_threshold, 0,
+ "Maximum percentage of metaslab fragmentation level to keep their active state");
/*
* When set will load all metaslabs when pool is first opened.
OpenPOWER on IntegriCloud