From d07b7c7f210e3f92775ad93a7306812edf524bfc Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Mon, 16 Mar 2015 12:21:21 +1100 Subject: Reduce size of zfs_sb_t: allocate z_hold_mtx separately zfs_sb_t has grown to the point where using kmem_zalloc() for allocations is triggering the 32k warning threshold. We can't safely convert this entire allocation to use vmem_alloc() instead of kmem_alloc() because the backing_dev_info structure is embedded here. It depends on the bit_waitqueue() function which won't behave properly when given a virtual address. Instead, use vmem_alloc() to allocate the z_hold_mtx array separately. Signed-off-by: Brian Behlendorf Signed-off-by: Chris Dunlop Closes #3178 --- include/sys/zfs_vfsops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sys/zfs_vfsops.h') diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h index 4b88260de..c4db2a911 100644 --- a/include/sys/zfs_vfsops.h +++ b/include/sys/zfs_vfsops.h @@ -92,7 +92,7 @@ typedef struct zfs_sb { 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 256 - kmutex_t z_hold_mtx[ZFS_OBJ_MTX_SZ]; /* znode hold locks */ + kmutex_t *z_hold_mtx; /* znode hold locks */ } zfs_sb_t; #define ZFS_SUPER_MAGIC 0x2fc12fc1 -- cgit v1.2.3