]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zstd: track allocator statistics
authorMateusz Guzik <mjguzik@gmail.com>
Fri, 30 Oct 2020 22:26:10 +0000 (23:26 +0100)
committerGitHub <noreply@github.com>
Fri, 30 Oct 2020 22:26:10 +0000 (15:26 -0700)
commitc4ede65bdfca11b532403620bbf0d6e33f0c1c1d
tree1c12eca95a260d3f2f130a187e1a6e52113318c4
parente8beeaa1116cc771360a24c9c1f9e6f47ced0e28
zstd: track allocator statistics

Note that this only tracks sizes as requested by the caller.
Actual allocated space will almost always be bigger (e.g., rounded up to
the next power of 2 or page size). Additionally the allocated buffer may
be holding other areas hostage. Nonetheless, this is a starting point
for tracking memory usage in zstd.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #11129
include/sys/zstd/zstd.h
module/zstd/zfs_zstd.c