HomeFreeBSD

Fix abd leak, kmem_free correct size of abd_t

Description

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

Details

Provenance
Jorgen Lundman <lundman@lundman.net>Authored on Jul 1 2021, 3:28 PM
GitHub <noreply@github.com>Committed on Jul 1 2021, 3:28 PM
Parents
rGeca174527e0b: Upstream: dmu_zfetch_stream_fini leaks refcount
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGc6d1112bf412: Fix abd leak, kmem_free correct size of abd_t (authored by Jorgen Lundman <lundman@lundman.net>).Jul 1 2021, 3:28 PM