diff options
author | Ryan Moeller <[email protected]> | 2020-10-26 17:34:28 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-26 14:34:28 -0700 |
commit | 5c810ac4999b773ec0528ca72c946d3acc82e87d (patch) | |
tree | cc03677f1c4176eca2609de6443b12778115d802 /module/os/freebsd | |
parent | 01a65c5861fb445e2a1f7aeceeaa821b595281c2 (diff) |
FreeBSD: Skip RAW kstat sysctls by default
These kstats are often expensive to compute so we want to avoid them
unless specifically requested.
The following kstats are affected by this change:
kstat.zfs.${pool}.multihost
kstat.zfs.${pool}.misc.state
kstat.zfs.${pool}.txgs
kstat.zfs.misc.fletcher_4_bench
kstat.zfs.misc.vdev_raidz_bench
kstat.zfs.misc.dbufs
kstat.zfs.misc.dbgmsg
In FreeBSD 13, sysctl(8) has been updated to still list the
names/description/type of skipped sysctls so they are still
discoverable.
Reviewed-by: Allan Jude <[email protected]>
Reviewed-by: Mateusz Guzik <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #11099
Diffstat (limited to 'module/os/freebsd')
-rw-r--r-- | module/os/freebsd/spl/spl_kstat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c index b26753bac..6bdef466c 100644 --- a/module/os/freebsd/spl/spl_kstat.c +++ b/module/os/freebsd/spl/spl_kstat.c @@ -475,14 +475,14 @@ kstat_install(kstat_t *ksp) if (ksp->ks_raw_ops.data) { root = SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(ksp->ks_sysctl_root), - OID_AUTO, ksp->ks_name, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + OID_AUTO, ksp->ks_name, CTLTYPE_STRING | CTLFLAG_RD + | CTLFLAG_MPSAFE | CTLFLAG_SKIP, ksp, 0, kstat_sysctl_raw, "A", ksp->ks_name); } else { root = SYSCTL_ADD_PROC(&ksp->ks_sysctl_ctx, SYSCTL_CHILDREN(ksp->ks_sysctl_root), - OID_AUTO, ksp->ks_name, - CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, + OID_AUTO, ksp->ks_name, CTLTYPE_OPAQUE | CTLFLAG_RD + | CTLFLAG_MPSAFE | CTLFLAG_SKIP, ksp, 0, kstat_sysctl_raw, "", ksp->ks_name); } break; |