Skip to content

Commit

Permalink
Increase ZFS_OBJ_MTX_SZ to 256
Browse files Browse the repository at this point in the history
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 openzfs/spl@043f9b57 commit.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1101
  • Loading branch information
behlendorf committed Nov 27, 2012
1 parent 0e20a31 commit 30315d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/sys/zfs_vfsops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 30315d2

Please sign in to comment.