aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_ioctl.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-02-05 12:43:37 -0800
committerBrian Behlendorf <[email protected]>2015-02-10 11:00:08 -0800
commit77aef6f60ea29f6d3769addc778db6328ac85755 (patch)
tree493dbe281fd2c93c0f55806d2b46076d5d71263b /module/zfs/zfs_ioctl.c
parentafe373260ebf96ca5482b9ccbcef5915c47d18f7 (diff)
Use vmem_alloc() for nvlists
Several of the nvlist functions may perform allocations larger than the 32k warning threshold. Convert them to use vmem_alloc() so the best allocator is used. Commit efcd79a retired KM_NODEBUG which was used to suppress large allocation warnings. Concurrently the large allocation warning threshold was increased from 8k to 32k. The goal was to identify the remaining locations, such as this one, where the allocation can be larger than 32k. This patch is expected fine tuning resulting for the kmem-rework changes, see commit 6e9710f. Signed-off-by: Brian Behlendorf <[email protected]> Closes #3057 Closes #3079 Closes #3081
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r--module/zfs/zfs_ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 5b9c8f17b..171e08c7a 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -1328,20 +1328,20 @@ get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp)
if (size == 0)
return (SET_ERROR(EINVAL));
- packed = kmem_alloc(size, KM_SLEEP);
+ packed = vmem_alloc(size, KM_SLEEP);
if ((error = ddi_copyin((void *)(uintptr_t)nvl, packed, size,
iflag)) != 0) {
- kmem_free(packed, size);
+ vmem_free(packed, size);
return (error);
}
if ((error = nvlist_unpack(packed, size, &list, 0)) != 0) {
- kmem_free(packed, size);
+ vmem_free(packed, size);
return (error);
}
- kmem_free(packed, size);
+ vmem_free(packed, size);
*nvp = list;
return (0);