mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Add zfs_object_mutex_size module option
Add a zfs_object_mutex_size module option to facilitate resizing the the per-dataset znode mutex array. Increasing this value may help make the deadlock described in #4106 less common, but this is not a proper fix. This patch is primarily to aid debugging and analysis. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tim Chase <tim@chase2k.com> Issue #4106
This commit is contained in:
@@ -273,9 +273,15 @@ typedef struct znode {
|
||||
/*
|
||||
* Macros for dealing with dmu_buf_hold
|
||||
*/
|
||||
#define ZFS_OBJ_HASH(obj_num) ((obj_num) & (ZFS_OBJ_MTX_SZ - 1))
|
||||
#define ZFS_OBJ_MTX_SZ 64
|
||||
#define ZFS_OBJ_MTX_MAX (1024 * 1024)
|
||||
|
||||
extern unsigned int zfs_object_mutex_size;
|
||||
|
||||
#define ZFS_OBJ_HASH(zsb, obj_num) \
|
||||
((obj_num) & ((zsb->z_hold_mtx_size) - 1))
|
||||
#define ZFS_OBJ_MUTEX(zsb, obj_num) \
|
||||
(&(zsb)->z_hold_mtx[ZFS_OBJ_HASH(obj_num)])
|
||||
(&(zsb)->z_hold_mtx[ZFS_OBJ_HASH(zsb, obj_num)])
|
||||
#define ZFS_OBJ_HOLD_ENTER(zsb, obj_num) \
|
||||
mutex_enter(ZFS_OBJ_MUTEX((zsb), (obj_num)))
|
||||
#define ZFS_OBJ_HOLD_TRYENTER(zsb, obj_num) \
|
||||
|
||||
Reference in New Issue
Block a user