From 30315d237bb23226476b348bc591589c80597351 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 27 Nov 2012 13:32:57 -0800 Subject: [PATCH] Increase ZFS_OBJ_MTX_SZ to 256 Increasing this limit costs us 6144 bytes of memory per mounted filesystem, but this is small price to pay for accomplishing the following: * Allows for up to 256-way concurreny when performing lookups which helps performance when there are a large number of processes. * Minimizes the likelyhood of encountering the deadlock described in issue #1101. Because vmalloc() won't strictly honor __GFP_FS there is still a very remote chance of a deadlock. See the zfsonlinux/spl@043f9b57 commit. Signed-off-by: Brian Behlendorf Closes #1101 --- include/sys/zfs_vfsops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h index 33ecf72fb..4dd46710f 100644 --- a/include/sys/zfs_vfsops.h +++ b/include/sys/zfs_vfsops.h @@ -87,7 +87,7 @@ typedef struct zfs_sb { uint64_t z_groupquota_obj; uint64_t z_replay_eof; /* New end of file - replay only */ sa_attr_type_t *z_attr_table; /* SA attr mapping->id */ -#define ZFS_OBJ_MTX_SZ 64 +#define ZFS_OBJ_MTX_SZ 256 kmutex_t z_hold_mtx[ZFS_OBJ_MTX_SZ]; /* znode hold locks */ } zfs_sb_t; -- 2.40.0