vregion: Disable virtual regions on ACE 2.0 and earlier#10698
vregion: Disable virtual regions on ACE 2.0 and earlier#10698jsarha wants to merge 1 commit intothesofproject:mainfrom
Conversation
1d2f039 to
807b364
Compare
There was a problem hiding this comment.
Pull request overview
Disables the virtual regions feature by default on older Intel ACE platforms (ACE 2.0 and earlier) to mitigate memory allocation failures under high module/pipeline memory pressure.
Changes:
- Updates
SOF_VREGIONSdefault selection to exclude ACE 1.5 (MTL) and ACE 2.0 (LNL).
Comments suppressed due to low confidence (1)
zephyr/Kconfig:266
- PR description mentions disabling the virtual memory heap (VMH) on ACE 2.0 and earlier, but this change only adjusts the default for
SOF_VREGIONS. If the intent is specifically to address VM heap allocation failures, consider also updatingVIRTUAL_HEAP’s default (or update the PR description to match what’s being disabled).
config SOF_VREGIONS
bool "Enable virtual memory regions"
default y if ACE && !ACE_VERSION_1_5 && !ACE_VERSION_2_0
depends on ACE
help
Enable the virtual regions memory allocator for pipeline resource management.
This provides a way to manage memory resources for audio pipelines,
including
1) multiple pipeline static lifetime allocations.
2) runtime pipeline allocations.
config VIRTUAL_HEAP
bool "Use virtual memory heap to allocate buffers"
default y if ACE
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -252,7 +252,7 @@ config SOF_ZEPHYR_NO_SOF_CLOCK | |||
|
|
|||
There was a problem hiding this comment.
The default condition references ACE_VERSION_1_5 and ACE_VERSION_2_0, but these symbols are not defined anywhere in this repository’s Kconfig files. If they’re not provided by the external Zephyr tree, Kconfig will treat them as undefined (effectively n), making the condition equivalent to default y if ACE and/or emitting undefined-symbol warnings. Please confirm the correct Kconfig symbols for MTL/LNL in the build (or define them here) so the default actually disables vregions on ACE 1.5/2.0.
| config ACE_VERSION_1_5 | |
| bool | |
| default n | |
| help | |
| Hidden platform/version selector for ACE 1.5 based builds. | |
| config ACE_VERSION_2_0 | |
| bool | |
| default n | |
| help | |
| Hidden platform/version selector for ACE 2.0 based builds. |
There was a problem hiding this comment.
It seems this time AI is not hallucinating things that are not there, but it is not seeing things that are there in src/platform/Kconfig .
807b364 to
8e1983c
Compare
lyakh
left a comment
There was a problem hiding this comment.
I suppose we can do this for now. I think MTL and LNL would benefit from vregion style mod_alloc() which we're going to implement, but we can also re-enable it later once such an implementation has been merged
|
In fact I'd like to understand how b3d0c47 breaks MTL and LNL. That commit is only supposed to take unused memory, not reducing the RAM used for heap or VMH. Apparently I'm misunderstanding something, would be good to know what exactly |
|
The provided description does not appear to match the actual proposed changes. The change disables |
There was a problem hiding this comment.
Commit b3d0c47 also increases CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT for MTL/LNL, is this intentionally not reverted?
But honestly not sure if there is a real need to differentiate platforms this way.
The virtual memory heap does not work properly on MTL or LNL and effectively the system from functioning due to virtual memory heap allocations failing when the demand for module memory is high, like in this test: TPLG="/lib/firmware/intel/development/sof-lnl-nocodec.tplg" MODEL=LNLP_RVP_NOCODEC SOF_TEST_INTERVAL=10 ~/sof-test/test-case/multiple-pipeline.sh -f a -c 20 -l Disable virtual memory heap for ACE 2.0 and earlier as quick remedy to the problem. With proper tuning it may be possible to get VREGIONS working on these platforms too. Fixes: b3d0c47 (vregion: Add support for per pipeline/module virtual regions) Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
In fact the test case in question passes successfully if CONFIG_MM_DRV_INTEL_VIRTUAL_REGION_COUNT is 2, even if vregions is enabled. But for some reason the same is not enough LNL (@lyakh can you explain why?) . I just wanted make the minimum change to make our test suite to complete successfully again. |
8e1983c to
c13d67f
Compare
|
But what is your actual error/fail? |
@abonislawski , All allocations starting to fail: There is more details in JIRA-1601 |
The virtual memory heap does not work properly on MTL or LNL and effectively the system from functioning due to virtual memory heap allocations failing when the demand for module memory is high, like in this test:
TPLG="/lib/firmware/intel/development/sof-lnl-nocodec.tplg" MODEL=LNLP_RVP_NOCODEC SOF_TEST_INTERVAL=10 ~/sof-test/test-case/multiple-pipeline.sh -f a -c 20 -l
Disable virtual memory heap for ACE 2.0 and earlier as quick remedy to the problem. With proper tuning it may be possible to get VMH working on these platforms too.
Fixes: b3d0c47 (vregion: Add support for per pipeline/module virtual regions)