-
Notifications
You must be signed in to change notification settings - Fork 716
[nrf fromlist] soc: nordic: common: dmm: Optimize DMM operations #3255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
d14dd4d
to
571b47e
Compare
176c724
to
3ce8a08
Compare
kl-cruz
approved these changes
Oct 6, 2025
3ce8a08
to
ed608da
Compare
nika-nordic
approved these changes
Oct 6, 2025
mstasiaknordic
approved these changes
Oct 6, 2025
adamkondraciuk
approved these changes
Oct 6, 2025
Add timing measurement to the test to allow DMM profiling. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit f06e050)
Default memcpy used in zephyr is not optimized and performs simple byte by byte copying. Using double word or word access can significantly reduce copying time especially for RAM3 (slow peripheral RAM). Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit ff3e018)
Add micro heap implementation which is using one or more 32 bit masks to allocate quickly blocks. It is significantly better than using sys_heap. Difference is especially big on RAM3 heap because heap control data is in RAM3 space so operations there were extremely slowly (15 us to allocate a buffer). Simplified implementation of the heap requires DMM API change as release functions need to know the length of the allocated buffer as simple heap requires that (buffer address is enough for the standard heap). Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit decdb30)
Align to API changes. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit 8cc4da3)
Add support for getting usage statistics for DMM. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit d10ee98)
Extended test to check usage stats and longer buffer alloc. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit 3d31042)
Add stress test which validates that allocator is thread safe and has no memory leaks. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit c02f904)
…mory region Skip stress test if null memory region. That's the case if DMM is disabled. Upstream PR #: 96831 Signed-off-by: Krzysztof Chruściński <[email protected]>
There were some corner cases and stress test could fail. Reworking tail bits handling to make the stress test pass. Upstream PR #: 96831 Signed-off-by: Krzysztof Chruściński <[email protected]>
ed608da
to
b4263d1
Compare
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.
Optimizations in DMM that significantly reduces time spent in DMM.
zephyrproject-rtos/zephyr#95306