freebsd-dev/sys/cddl
Alexander Motin a4d5fcadd8 FreeBSD'fy ZFS zlib zalloc/zfree callbacks.
The previous code came from OpenSolaris, which in my understanding require
allocation size to be known to free memory.  To store that size previous
code allocated additional 8 byte header.  But I have noticed that zlib
with present settings allocates 64KB context buffers for each call, that
could be efficiently cached by UMA, but addition of those 8 bytes makes
them fall back to physical RAM allocations, that cause huge overhead and
lock congestion on small blocks.  Since FreeBSD's free() does not have
the size argument, switching to it solves the problem, increasing write
speed to ZVOLs with 4KB block size and GZIP compression on my 40-threads
test system from ~60MB/s to ~600MB/s.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2019-10-29 21:25:19 +00:00
..
boot/zfs loader: zio_checksum_verify should check byteswap 2019-10-27 08:35:29 +00:00
compat/opensolaris fix up r353340, don't assume that fcmpset has strong semantics 2019-10-11 17:01:02 +00:00
contrib/opensolaris FreeBSD'fy ZFS zlib zalloc/zfree callbacks. 2019-10-29 21:25:19 +00:00
dev dtrace: 64-bits registers support 2019-10-04 16:17:00 +00:00