From 5b1f2041e5093b0a5da88e0aa4e0e89745b53a18 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 17 Jun 2010 12:34:46 -0700 Subject: [PATCH] Silence 3 additional large kmem warnings The following are 3 cases where move than 2 pages are allocated with a kmem_alloc()... but not a lot more. For now we just disable the warning with KM_NODEBUG and this can be revisted latter to see if it's worth shrinking the allocation or perhaps moving it to a slab. --- module/zfs/spa_config.c | 4 ++-- module/zfs/spa_misc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c index cdeda3f93c..6fc4ad0a88 100644 --- a/module/zfs/spa_config.c +++ b/module/zfs/spa_config.c @@ -96,7 +96,7 @@ spa_config_load(void) if (kobj_get_filesize(file, &fsize) != 0) goto out; - buf = kmem_alloc(fsize, KM_SLEEP); + buf = kmem_alloc(fsize, KM_SLEEP | KM_NODEBUG); /* * Read the nvlist from the file. @@ -159,7 +159,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) */ VERIFY(nvlist_size(nvl, &buflen, NV_ENCODE_XDR) == 0); - buf = kmem_alloc(buflen, KM_SLEEP); + buf = kmem_alloc(buflen, KM_SLEEP | KM_NODEBUG); temp = kmem_zalloc(MAXPATHLEN, KM_SLEEP); VERIFY(nvlist_pack(nvl, &buf, &buflen, NV_ENCODE_XDR, diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 3999bf7032..660f25524b 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -437,7 +437,7 @@ spa_add(const char *name, nvlist_t *config, const char *altroot) ASSERT(MUTEX_HELD(&spa_namespace_lock)); - spa = kmem_zalloc(sizeof (spa_t), KM_SLEEP); + spa = kmem_zalloc(sizeof (spa_t), KM_SLEEP | KM_NODEBUG); mutex_init(&spa->spa_async_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&spa->spa_errlist_lock, NULL, MUTEX_DEFAULT, NULL);