]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Disable user space reference tracking
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 13 Apr 2020 17:51:44 +0000 (10:51 -0700)
committerGitHub <noreply@github.com>
Mon, 13 Apr 2020 17:51:44 +0000 (10:51 -0700)
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 <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10189

module/zfs/refcount.c

index a612b2f40c05a9158d28db229c8a1022c3339e4d..6c9c305edaa37c919e726884a6ff3bb7abfddcd7 100644 (file)
 #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