Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Needs Check] IPC worker thread can run on secondary cores #8165

Open
lyakh opened this issue Sep 6, 2023 · 4 comments · May be fixed by #9764
Open

[BUG][Needs Check] IPC worker thread can run on secondary cores #8165

lyakh opened this issue Sep 6, 2023 · 4 comments · May be fixed by #9764
Assignees
Labels
bug Something isn't working as expected P2 Critical bugs or normal features
Milestone

Comments

@lyakh
Copy link
Collaborator

lyakh commented Sep 6, 2023

Describe the bug

SOF isn't an SMP system, its use of cores is hard-wired. Most management tasks are only supposed to run on the primary core, only pre-assigned audio processing tasks should run on secondary cores. One of such management tasks is the EDF scheduler work handler. To fix it to the primary core a special work queue is created, which is set to only run on the primary core, and the delayed work, implementing the scheduler, is submitted to that queue.

Whereas the IPC delayed work is run on the default work queue, which on Zephyr can run on any core.

Expected behavior

The IPC delayed work should only run on the primary core.

Impact

Running on a secondary core without proper code synchronisation can lead to data corruption.

@lyakh lyakh added bug Something isn't working as expected P2 Critical bugs or normal features labels Sep 6, 2023
@lgirdwood
Copy link
Member

@marcinszkudlinski are you also aligned with this proposal ?

@lgirdwood lgirdwood added this to the v2.8 milestone Sep 13, 2023
@kv2019i
Copy link
Collaborator

kv2019i commented Nov 20, 2023

Nobody assigned, less than a week to branch, moving to v2.9.

@kv2019i kv2019i modified the milestones: v2.8, v2.9 Nov 20, 2023
@kv2019i kv2019i modified the milestones: v2.9, v2.10 Mar 4, 2024
@kv2019i
Copy link
Collaborator

kv2019i commented Mar 4, 2024

Stable-v2.9 branched, this didn't make the cut, bumping to 2.10.

@lgirdwood lgirdwood modified the milestones: v2.10, v2.11 May 28, 2024
@kv2019i kv2019i modified the milestones: v2.11, v2.12 Sep 5, 2024
@kv2019i
Copy link
Collaborator

kv2019i commented Jan 3, 2025

@lyakh Can you check this and if still valid, ensure this is covered for for v2.13 ? Bumping now as v2.12 has been already branched.

@kv2019i kv2019i modified the milestones: v2.12, v2.13 Jan 3, 2025
lyakh added a commit to lyakh/sof that referenced this issue Jan 6, 2025
Low level IPC processing should be confined to the primary core. Move
delayed IPC sending to a dedicated work queue with core 0 affinity.

Fixes: thesofproject#8165
Signed-off-by: Guennadi Liakhovetski <[email protected]>
@lyakh lyakh linked a pull request Jan 6, 2025 that will close this issue
lyakh added a commit to lyakh/sof that referenced this issue Jan 9, 2025
Low level IPC processing should be confined to the primary core. Move
delayed IPC sending to a dedicated work queue with core 0 affinity.

Fixes: thesofproject#8165
Signed-off-by: Guennadi Liakhovetski <[email protected]>
lyakh added a commit to lyakh/sof that referenced this issue Jan 10, 2025
Low level IPC processing should be confined to the primary core. Move
delayed IPC sending to a dedicated work queue with core 0 affinity.

Fixes: thesofproject#8165
Signed-off-by: Guennadi Liakhovetski <[email protected]>
lyakh added a commit to lyakh/sof that referenced this issue Jan 10, 2025
Low level IPC processing should be confined to the primary core. Move
delayed IPC sending to a dedicated work queue with core 0 affinity.

Fixes: thesofproject#8165
Signed-off-by: Guennadi Liakhovetski <[email protected]>
lyakh added a commit to lyakh/sof that referenced this issue Jan 13, 2025
Low level IPC processing should be confined to the primary core. Move
delayed IPC sending to a dedicated work queue with core 0 affinity.

Fixes: thesofproject#8165
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected P2 Critical bugs or normal features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants