Avoid more abd_t allocations in RAIDZ/dRAID#18668
Open
amotin wants to merge 1 commit into
Open
Conversation
robn
approved these changes
Jun 16, 2026
robn
left a comment
Member
There was a problem hiding this comment.
Yeah, good improvement, nice one.
RAIDZ/dRAID allocate rc_abdstruct for every column, but used it only for data columns, while parity columns allocated additional abd_t's on top of that. This change introduces abd_alloc_linear_struct(), abd_alloc_gang_struct() and abd_get_zeros_struct() to the ABD API, mirroring the existing abd_get_offset_struct() pattern, and uses them to use rc_abdstruct in remaining column cases. Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com>
Contributor
|
I've rebased this PR on master to get another CI run with this change and #18695 both applied. There shouldn't be any issue, but no harm in making sure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RAIDZ/dRAID allocate
rc_abdstructfor every column, but used it only for data columns, while parity columns allocated additionalabd_t's on top of that. This change introducesabd_alloc_linear_struct(),abd_alloc_gang_struct()andabd_get_zeros_struct()to the ABD API, mirroring the existingabd_get_offset_struct()pattern, and uses them to userc_abdstructin remaining column cases.How Has This Been Tested?
Profiles of RAIDZ2 write tests show a percent of ZIO pipeline CPU saved.
Types of changes
Checklist:
Signed-off-by.