summaryrefslogtreecommitdiffstats
path: root/module/nvpair
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/nvpair
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/nvpair')
-rw-r--r--module/nvpair/nvpair_alloc_spl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/nvpair/nvpair_alloc_spl.c b/module/nvpair/nvpair_alloc_spl.c
index f9055b94f..bc377ab66 100644
--- a/module/nvpair/nvpair_alloc_spl.c
+++ b/module/nvpair/nvpair_alloc_spl.c
@@ -26,17 +26,18 @@
#include <sys/nvpair.h>
#include <sys/kmem.h>
+#include <sys/vmem.h>
static void *
nv_alloc_sleep_spl(nv_alloc_t *nva, size_t size)
{
- return (kmem_alloc(size, KM_SLEEP));
+ return (vmem_alloc(size, KM_SLEEP));
}
static void *
nv_alloc_pushpage_spl(nv_alloc_t *nva, size_t size)
{
- return (kmem_alloc(size, KM_PUSHPAGE));
+ return (vmem_alloc(size, KM_PUSHPAGE));
}
static void *