Skip to content

Commit

Permalink
Quiet two more large allocation warnings
Browse files Browse the repository at this point in the history
Both of these allocations are larger than 8k which trips the
warning, but so no large that they must be vmem_alloc()'ed.  For
this case I have added the KM_NODEBUG flag which silences the
warning.  The flag also acts as a marker in the source so I can
keep track of this as something which needs to be better addressed
in the long term.

SPL: large kmem_alloc(11876, 0x50) at get_nvlist:911 (341009/1877530)
SPL: large kmem_alloc(11240, 0x50) at load_nvlist:1273 (2639492/2643588)

Closes #50
  • Loading branch information
behlendorf committed Aug 12, 2010
1 parent 3fb1611 commit 9ae9e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion module/zfs/spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value)
nvsize = *(uint64_t *)db->db_data;
dmu_buf_rele(db, FTAG);

packed = kmem_alloc(nvsize, KM_SLEEP);
packed = kmem_alloc(nvsize, KM_SLEEP | KM_NODEBUG);
error = dmu_read(spa->spa_meta_objset, obj, 0, nvsize, packed,
DMU_READ_PREFETCH);
if (error == 0)
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/zfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp)
if (size == 0)
return (EINVAL);

packed = kmem_alloc(size, KM_SLEEP);
packed = kmem_alloc(size, KM_SLEEP | KM_NODEBUG);

if ((error = ddi_copyin((void *)(uintptr_t)nvl, packed, size,
iflag)) != 0) {
Expand Down

0 comments on commit 9ae9e07

Please sign in to comment.