diff options
-rw-r--r-- | cmd/zdb/zdb.c | 7 | ||||
-rw-r--r-- | module/zfs/refcount.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 10bca4a91..cc4b0340f 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -84,10 +84,12 @@ zdb_ot_name(dmu_object_type_t type) } #ifndef lint +extern int reference_tracking_enable; extern int zfs_recover; extern uint64_t zfs_arc_max, zfs_arc_meta_limit; extern int zfs_vdev_async_read_max_active; #else +int reference_tracking_enable; int zfs_recover; uint64_t zfs_arc_max, zfs_arc_meta_limit; int zfs_vdev_async_read_max_active; @@ -3813,6 +3815,11 @@ main(int argc, char **argv) */ zfs_vdev_async_read_max_active = 10; + /* + * Disable reference tracking for better performance. + */ + reference_tracking_enable = B_FALSE; + kernel_init(FREAD); if ((g_zfs = libzfs_init()) == NULL) { (void) fprintf(stderr, "%s", libzfs_error_init(errno)); diff --git a/module/zfs/refcount.c b/module/zfs/refcount.c index 6f8f4db08..b33874714 100644 --- a/module/zfs/refcount.c +++ b/module/zfs/refcount.c @@ -26,8 +26,6 @@ #include <sys/zfs_context.h> #include <sys/refcount.h> -#ifdef ZFS_DEBUG - #ifdef _KERNEL int reference_tracking_enable = FALSE; /* runs out of memory too easily */ #else @@ -35,6 +33,7 @@ int reference_tracking_enable = TRUE; #endif int reference_history = 3; /* tunable */ +#ifdef ZFS_DEBUG static kmem_cache_t *reference_cache; static kmem_cache_t *reference_history_cache; |