Skip to content

llext: Allow multiple DP instances of same module - #11140

Open
jsarha wants to merge 1 commit into
thesofproject:mainfrom
jsarha:llext_dp_fix
Open

llext: Allow multiple DP instances of same module#11140
jsarha wants to merge 1 commit into
thesofproject:mainfrom
jsarha:llext_dp_fix

Conversation

@jsarha

@jsarha jsarha commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The LL userspace changes broke support of multiple instances of same DP module. This is a quick remedy to fix that. The fix has a down side that it does not allow having both LL and DP instances of the same module within a same configuration.

This fixes #11133

The LL userspace changes broke support of multiple instances of same DP
module. This is a quick remedy to fix that. The fix has a down side
that it does not allow having both LL and DP instances of the same
module within a same configuration.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Copilot AI lite review requested due to automatic review settings August 28, 2026 09:11

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.

Pull request overview

Fixes regression where multiple DP (Data Processing) instances of the same LLEXT module could not be safely used after recent LL userspace changes, by ensuring module segments are added to each DP instance’s memory domain even when the underlying LLEXT is already refcounted.

Changes:

  • Treat DP modules as a special case when deciding whether to add module partitions to a memory domain (don’t skip on use_count > 1).
  • Document the known limitation that mixed LL+DP instances of the same module in one configuration are not supported by this quick remedy.
Suppressed comments (1)

src/library_manager/llext_manager.c:854

  • This change intentionally makes mixed LL+DP instances of the same module unsupported, but the code currently may still proceed in such a configuration and later fault (e.g., llext_manager_add_domain() can return success while skipping all partition additions when mctx->domain_dp is false and the module is already refcounted). Consider failing fast when a new instance’s ipc_config->proc_domain conflicts with the already-mapped module’s mctx->domain_dp (e.g., in llext_manager_allocate_module()), returning an error and logging a clear message instead of allowing a hard-to-debug crash.
	 * NOTE: This approach will make it impossible to have one module
	 *       to have both LL and DP instances within one configuration.
	 *       This will be fixed in future.
	 */
	if (!mctx->domain_dp && ext->use_count > 1 && mctx->n_dependent != 1)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +850 to +852
* NOTE: This approach will make it impossible to have one module
* to have both LL and DP instances within one configuration.
* This will be fixed in future.
@softwarecki
softwarecki self-requested a review August 28, 2026 15:29
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.

[BUG] The latest sof/main fails when playing back and recording through nocodec port2 on PTL RVP

6 participants