ring_buffer: Increase buffer size to prevent a DP module starvation#9724
Merged
kv2019i merged 1 commit intothesofproject:mainfrom Dec 16, 2024
Merged
ring_buffer: Increase buffer size to prevent a DP module starvation#9724kv2019i merged 1 commit intothesofproject:mainfrom
kv2019i merged 1 commit intothesofproject:mainfrom
Conversation
Increase buffer size to 3 times max_ibs_obs to prevent starving a DP module that process different block sizes in different periods (44.1 kHz case). Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
tmleman
approved these changes
Dec 13, 2024
Contributor
There was a problem hiding this comment.
LGTM
Nice description btw.
marcinszkudlinski
approved these changes
Dec 13, 2024
kv2019i
approved these changes
Dec 16, 2024
| * in the output signal. To resolve this situation and allow the module to process | ||
| * correctly, it is necessary to allocate a buffer three times larger than max_ibs_obs. | ||
| */ | ||
| ring_buffer->data_buffer_size = 3 * max_ibs_obs; |
Collaborator
There was a problem hiding this comment.
I was left wondering should this be configurable given this corner case is only hit with specific pipelines (like the SRC case given as example). OTOH, the default should be safe, so I think this PR makes sense at this point and optimization (if needed) can come later.
Contributor
There was a problem hiding this comment.
@kv2019i My proposition was that the module should declare if it needs any data retention between cycles. It would also make possible using a shared memory space as a buffer - a module always consume 100% data if no retention is needed, leaving a buffer empty ==> memory may be used for other purposes.
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.
Increase buffer size to 3 times
max_ibs_obsto prevent starving a DP module that process different block sizes in different periods (44.1 kHz case). The full description has been added as a comment in the source code.