Author: mav Date: Sun Aug 9 20:41:44 2015 New Revision: 286556 URL: https://svnweb.freebsd.org/changeset/base/286556
Log: MFV 286555: Avoid 128K kmem allocations in mzap_upgrade() Reviewed by: Matthew Ahrens <mahr...@delphix.com> Reviewed by: Prakash Surya <prakash.su...@delphix.com> Reviewed by: George Wilson <geo...@delphix.com> Reviewed by: Steven Hartland <kill...@multiplay.co.uk> Approved by: Rich Lowe <richl...@richlowe.net> illumos/illumos-gate@be3e2ab906b80af79c7b22885f279e45ad8fb995 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:41:23 2015 (r286555) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:41:44 2015 (r286556) @@ -547,7 +547,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, ASSERT(RW_WRITE_HELD(&zap->zap_rwlock)); sz = zap->zap_dbuf->db_size; - mzp = kmem_alloc(sz, KM_SLEEP); + mzp = zio_buf_alloc(sz); bcopy(zap->zap_dbuf->db_data, mzp, sz); nchunks = zap->zap_m.zap_num_chunks; @@ -555,7 +555,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, err = dmu_object_set_blocksize(zap->zap_objset, zap->zap_object, 1ULL << fzap_default_block_shift, 0, tx); if (err) { - kmem_free(mzp, sz); + zio_buf_free(mzp, sz); return (err); } } @@ -581,7 +581,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, if (err) break; } - kmem_free(mzp, sz); + zio_buf_free(mzp, sz); *zapp = zap; return (err); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"