diff options
author | Jorgen Lundman <[email protected]> | 2021-07-02 00:28:15 +0900 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-09-14 12:22:28 -0700 |
commit | 035219ee10b19713130134d22a0ff7b7d7b85f94 (patch) | |
tree | 7ee06226a962d87fac5c29213a3972f4ed6caeca /module/zfs | |
parent | 2334bc4efa9aeb6052d8c8c839efbdf784ac4e91 (diff) |
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 <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Jorgen Lundman <[email protected]>
Co-authored-by: Sean Doran <[email protected]>
Closes #12295
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/abd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/abd.c b/module/zfs/abd.c index d5fafccd0..cc2d3575d 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -531,7 +531,7 @@ abd_get_offset_impl(abd_t *abd, abd_t *sabd, size_t off, size_t size) } ASSERT3U(left, ==, 0); } else { - abd = abd_get_offset_scatter(abd, sabd, off); + abd = abd_get_offset_scatter(abd, sabd, off, size); } ASSERT3P(abd, !=, NULL); |