Date: Sun, 9 Aug 2015 20:41:24 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r286555 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201508092041.t79KfOdo026309@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Aug 9 20:41:23 2015 New Revision: 286555 URL: https://svnweb.freebsd.org/changeset/base/286555 Log: Avoid 128K kmem allocations in mzap_upgrade() Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Steven Hartland <killing@multiplay.co.uk> Approved by: Rich Lowe <richlowe@richlowe.net> illumos/illumos-gate@be3e2ab906b80af79c7b22885f279e45ad8fb995 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:32:30 2015 (r286554) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c Sun Aug 9 20:41:23 2015 (r286555) @@ -538,7 +538,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; @@ -546,7 +546,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); } } @@ -572,7 +572,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508092041.t79KfOdo026309>