[userspace LL] disable VMH, increase heap - #11173
Conversation
VMH uses a hard-coded chunk configuration, which wastes SRAM. We can instead move to use vregions for large allocations, but while vregion use isn't sufficient, we temporarily increase the conventional heap. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
There was a problem hiding this comment.
🟡 Changes recommended
SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZE can still default non-zero when VIRTUAL_HEAP is disabled due to VIRTUAL_HEAP_EXTENDED defaulting to y, which undermines the intended SRAM savings.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR aims to reduce wasted SRAM caused by the VMH (virtual heap) hard-coded chunk configuration by disabling virtual heap usage (for PTL userspace-LL overlay) and temporarily increasing the conventional Zephyr heap size to compensate while vregion-based large allocations are still incomplete.
Changes:
- Increase the default
SOF_ZEPHYR_HEAP_SIZEforSOC_ACE30/SOC_ACE40. - Change
SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZEdefaults to be non-zero only whenVIRTUAL_HEAPis enabled, otherwise default to0. - Disable
VIRTUAL_HEAPin the PTL userspace-LL overlay.
File summaries
| File | Description |
|---|---|
zephyr/Kconfig |
Adjust heap sizing defaults and virtual-heap-region sizing behavior. |
app/overlays/ptl/ll_userspace_overlay.conf |
Disable virtual heap in PTL userspace-LL overlay configuration. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # TODO: needs some better solution to allocate | ||
| CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x80000 | ||
|
|
||
| CONFIG_VIRTUAL_HEAP=n |
| default 0x140000 if VIRTUAL_HEAP_EXTENDED | ||
| default 0x100000 | ||
| default 0x100000 if VIRTUAL_HEAP | ||
| default 0x0 |
PR 11173: test resultsRun date: 2026-09-07 12:12 UTC Tested commit: d98531957849ecb8410324190a5df9b9e1eebd4c |
kv2019i
left a comment
There was a problem hiding this comment.
Commit msg could be more clear, but change itself is good.
| @@ -37,3 +37,5 @@ CONFIG_XRUN_NOTIFICATIONS_ENABLE=n | |||
| # enabled and uses the vmh allocation intended for KBP. | |||
There was a problem hiding this comment.
"vregion use isn't sufficient" is a bit hard to understand. Maybe something like "During the transition period when vregion is not yet used by all modules, we temporarily increase..."
|
Fuzzer fails are known #11162 |
VMH uses a hard-coded chunk configuration, which wastes SRAM. We can instead move to use vregions for large allocations, but while vregion use isn't sufficient, we temporarily increase the conventional heap.