Skip to content

[userspace LL] disable VMH, increase heap - #11173

Open
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:heap
Open

[userspace LL] disable VMH, increase heap#11173
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:heap

Conversation

@lyakh

@lyakh lyakh commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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_SIZE for SOC_ACE30 / SOC_ACE40.
  • Change SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZE defaults to be non-zero only when VIRTUAL_HEAP is enabled, otherwise default to 0.
  • Disable VIRTUAL_HEAP in 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.

Comment thread app/overlays/ptl/ll_userspace_overlay.conf
Comment thread zephyr/Kconfig
@intel-sofci

intel-sofci commented Sep 7, 2026

Copy link
Copy Markdown

PR 11173: test results

Run date: 2026-09-08 09:49 UTC

Tested commit: cc784a355b5ad8fdff5d2bd3a73cfa608c80c1e3

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"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..."

@kv2019i

kv2019i commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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 during
the transition period when vregion is not yet used by all such
allocations, we temporarily increase the conventional heap.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh

lyakh commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

@lrudyX looks like https://github.com/intel-innersource/drivers.audio.firmware.sof-ci/actions/runs/34206490330 failed again our beloved "random HDA DMA" tests

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.

4 participants