Repository navigation
memory: added requesting alignment for buffer heap - #1698
Conversation
|
ACK |
aa773aa to
d6ef0f6
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
We should not force all malloc() callers to request an alignment (as most dont care). So we should have
void *malloc(size);
void *malloc_align(size, alignment);where malloc() internally just calls malloc_align(size, 0)
d6ef0f6 to
b58ee4c
Compare
c94c926 to
07abe09
Compare
|
@lgirdwood With @tlauda we asumed that aligning every allocation to casheline will improve overall performance. |
jajanusz
left a comment
There was a problem hiding this comment.
Please change order of commits to not break git bisect for host.
07abe09 to
cc1a5cd
Compare
|
@dabekjakub Please use imperative mood in the commit subject line https://chris.beams.io/posts/git-commit/#imperative e.g host: fixed memory function definitions -> host: Fix memory function definitions Also, commit message:
What does this even mean? Please try to make your commit messages more clear. People should get a feel of your change by reading the commit message. |
97f8e24 to
1a92c35
Compare
|
@dabekjakub there is still one commit subject that needs to be fixed. Please be consistent :) |
1a92c35 to
28d387b
Compare
|
SOFCI TEST |
tlauda
left a comment
There was a problem hiding this comment.
Could you add additional commit to this PR, where you are adding alignment also to rmalloc_sys and by default calling it with PLATFORM_DCACHE_ALIGN? Implementation itself is already in place, so it's just a minor tweak.
28d387b to
01607c4
Compare
|
@tlauda changes implemented , as far as i can see rmalloc_sys has selalign in it already |
86fefb6 to
779e40e
Compare
We need to use the ISA macro, but also have our own additional macro for cache enablement. I think that right now the cache is only enabled on cAVS platforms, so there is no point in aligning to cache line in this case. |
Sorry, not following, do you mean there is no point aliging to cache line size on CAVS platforms ? |
I'm saying there is no point aligning to cache line on non-cAVS platforms. |
|
@tlauda ok, but I'm hesistant here to just use an alignment that does not align with core-isa (even though cache is not implemented). I'm suspiscious that the cache line size value is defined as non zero and that may also be used by compiler for optimised text/data alignment, prefeching or some other undocumented hint used by the compiler to generate optimised code. |
fd84fef to
eb583e1
Compare
Adjust memory sizes for heaps to provide enough memory for alignment in buffer heap. Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
Fix alloc definitions for host build. Function definitions were using defines in their body which blocked usage of const values in said defines. Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
eb583e1 to
50b7063
Compare
|
SOFCI TEST |
|
@tlauda @lgirdwood it looks good to me now - bugs fixed |
Add alignment option for memory requests. Fix alloc definitions for UT. Function definitions were using defines in their body which blocked usage of const values in said defines. Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
50b7063 to
0b673cb
Compare
Stale review, PR uses correct alignment option
|
Checkpatch errors are related to code that was already there and are not effect of this PR |
|
Any reason why rebasing on top of the last commit breaks my platform on playback? I'm not seeing any error trace related to some buffer failing to allocate, however the actual alignment looks weird enough to me to need to take a closer look. |
|
Huh, I think you need to return with a fix for when CONFIG_HEAP_DEBUG is enabled. Currently (as-merged) rballoc macro is defined twice instead of defining rballoc and rballoc_align. |
|
@paulstelian97 when it comes to playback I saw no issues and CI went through with no problem. DEBUG_HEAP Fix on the way. |
|
Yeah, I think something else actually caused issues with my SYS_RT heap being too small. I will continue to investigate my issues separately. Whenever I identify an upstream commit I will ask about it. |
Added buffer alignment API.
Needed to set alignment that different buffers require.
Example: Dma buffer has to be aligned to 128 due to hardware
configuration.
Signed-off-by: Jakub Dabek jakub.dabek@intel.com