Increase ZFS_OBJ_MTX_SZ to 256
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Nov 2012 21:32:57 +0000 (13:32 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Nov 2012 21:46:32 +0000 (13:46 -0800)
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 <behlendorf1@llnl.gov>
Closes #1101

include/sys/zfs_vfsops.h

index 33ecf72..4dd4671 100644 (file)
@@ -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;