Skip to content

Commit a9354b3

Browse files
behlendorfjsai20
authored andcommitted
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 openzfs#10189
1 parent 8ac287c commit a9354b3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

module/zfs/refcount.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
#include <sys/zfs_context.h>
2727
#include <sys/refcount.h>
2828

29-
#ifdef _KERNEL
30-
int reference_tracking_enable = FALSE; /* runs out of memory too easily */
31-
#else
32-
int reference_tracking_enable = TRUE;
33-
#endif
29+
/*
30+
* Reference count tracking is disabled by default. It's memory requirements
31+
* are reasonable, however as implemented it consumes a significant amount of
32+
* cpu time. Until its performance is improved it should be manually enabled.
33+
*/
34+
int reference_tracking_enable = FALSE;
3435
int reference_history = 3; /* tunable */
3536

3637
#ifdef ZFS_DEBUG

0 commit comments

Comments
 (0)