]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix abd leak, kmem_free correct size of abd_t
authorJorgen Lundman <lundman@lundman.net>
Thu, 1 Jul 2021 15:28:15 +0000 (00:28 +0900)
committerTony Hutter <hutter2@llnl.gov>
Tue, 14 Sep 2021 19:22:28 +0000 (12:22 -0700)
commit035219ee10b19713130134d22a0ff7b7d7b85f94
tree7ee06226a962d87fac5c29213a3972f4ed6caeca
parent2334bc4efa9aeb6052d8c8c839efbdf784ac4e91
Fix abd leak, kmem_free correct size of abd_t

Fix a leak of abd_t that manifested mostly when using
raidzN with at least as many columns as N (e.g. a
four-disk raidz2 but not a three-disk raidz2).
Sufficiently heavy raidz use would eventually run a system
out of memory.

Additionally:

* Switch abd_cache arena to FIRSTFIT, which empirically
improves perofrmance.

* Make abd_chunk_cache more performant and debuggable.

* Allocate the abd_zero_buf from abd_chunk_cache rather
than the heap.

* Don't try to reap non-existent qcaches in abd_cache arena.

* KM_PUSHPAGE->KM_SLEEP when allocating chunks from their
own arena

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Co-authored-by: Sean Doran <smd@use.net>
Closes #12295
include/sys/abd_impl.h
module/os/freebsd/zfs/abd_os.c
module/os/linux/zfs/abd_os.c
module/zfs/abd.c