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 <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10189
This commit is contained in:
Brian Behlendorf 2020-04-13 10:51:44 -07:00 committed by GitHub
parent c602b35cf7
commit 791e480c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -26,11 +26,12 @@
#include <sys/zfs_context.h> #include <sys/zfs_context.h>
#include <sys/refcount.h> #include <sys/refcount.h>
#ifdef _KERNEL /*
int reference_tracking_enable = FALSE; /* runs out of memory too easily */ * Reference count tracking is disabled by default. It's memory requirements
#else * are reasonable, however as implemented it consumes a significant amount of
int reference_tracking_enable = TRUE; * cpu time. Until its performance is improved it should be manually enabled.
#endif */
int reference_tracking_enable = FALSE;
int reference_history = 3; /* tunable */ int reference_history = 3; /* tunable */
#ifdef ZFS_DEBUG #ifdef ZFS_DEBUG