aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-04-13 10:51:44 -0700
committerGitHub <[email protected]>2020-04-13 10:51:44 -0700
commit791e480c6ac7a3e33adc5270b3fc99015f9f0c15 (patch)
treed101d17bab6070abb70e549e4bc7f7ccb4197ee5 /module
parentc602b35cf7091e5afd192c9a943433379e21f567 (diff)
Disable user space reference tracking
The memory and cpu cost of reference count tracking with the current implementation is significant. For this reason it has always been disabled by default for the kmods. Apply this same default to user space so ztest doesn't always incur this performance penalty. Our intention is to re-enable this by default for ztest once the code has been optimized. Since we expect to at some point provide a FUSE implementation we wouldn't want this enabled by default for libzpool. Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10189
Diffstat (limited to 'module')
-rw-r--r--module/zfs/refcount.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/module/zfs/refcount.c b/module/zfs/refcount.c
index a612b2f40..6c9c305ed 100644
--- a/module/zfs/refcount.c
+++ b/module/zfs/refcount.c
@@ -26,11 +26,12 @@
#include <sys/zfs_context.h>
#include <sys/refcount.h>
-#ifdef _KERNEL
-int reference_tracking_enable = FALSE; /* runs out of memory too easily */
-#else
-int reference_tracking_enable = TRUE;
-#endif
+/*
+ * Reference count tracking is disabled by default. It's memory requirements
+ * are reasonable, however as implemented it consumes a significant amount of
+ * cpu time. Until its performance is improved it should be manually enabled.
+ */
+int reference_tracking_enable = FALSE;
int reference_history = 3; /* tunable */
#ifdef ZFS_DEBUG