Skip to content

zephyr: wrapper: disable cached heap on Intel platforms - #4673

Merged
lgirdwood merged 1 commit into
thesofproject:mainfrom
kv2019i:topic/z-disable-cached-heap
Aug 24, 2021
Merged

lgirdwood merged 1 commit into
thesofproject:mainfrom
kv2019i:topic/z-disable-cached-heap

Conversation

@kv2019i

@kv2019i kv2019i commented Aug 24, 2021

Copy link
Copy Markdown
Collaborator

This is a bit of a step back, but it seems the heap corrupt can still be hit and now with dynamic pipelines increasing the complexity of heap alloc/free patterns in SOF, the issue is hit much more easily than before.

This does incur a ~15-20% performance penalty, but given the recently added support to build with XCC, the current sof-test cases still pass on Intel cAVS2.5 targets, so this seems like a reasonable step to take now.

Tests with dynamic-pipeline topologies increase the complexity
of alloc/free patterns for heap and these tests have uncovered
new issues with heap corruption. Tests are reporting failed
allocs although heap still has free space. Running same test
with cached heap disabled shows no failures.

The cached heap is already disabled for IMX targets, so build on
this code and add a local ENABLE_CACHED_HEAP define to toggle
the cached heap.

BugLink: #4494
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com

Tests with dynamic-pipeline topologies increase the complexity
of alloc/free patterns for heap and these tests have uncovered
new issues with heap corruption. Tests are reporting failed
allocs although heap still has free space. Running same test
with cached heap disabled shows no failures.

The cached heap is already disabled for IMX targets, so build on
this code and add a local ENABLE_CACHED_HEAP define to toggle
the cached heap.

BugLink: thesofproject#4494
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the way forward - we should be enabling these to cacheable on a one by one basis. @ranj063 @keyonjie fyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants