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

core: set timeout to 400ms for secondary core disabling #8149

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

RanderWang
Copy link
Collaborator

Linux driver set ipc timeout duration to 500ms, but FW wait 5000ms in cpu_disable_core for SET_DX ipc message. This makes driver stop but fw is still waiting. Actually the disabling can be successful in far less than 5000ms and it was first designed for FPGA case. Now change it to 400ms to make debugging easier.

This patch changes cavs and ace15 platforms and doesn't change ace20 for its current state.

fix #8115

Copy link
Contributor

@btian1 btian1 left a comment

Choose a reason for hiding this comment

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

assumed 100ms used to do communication and disabling is enough?

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Let's just change the default.

@@ -467,7 +467,7 @@ config SOF_STACK_SIZE
components.

config SECONDARY_CORE_DISABLING_TIMEOUT
int
int "Secondary core disabling timeout"
default 5000
Copy link
Collaborator

Choose a reason for hiding this comment

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

@RanderWang Can you make a patch that changes the default to 400ms instead? SOF driver and firmware are hosted in same public project, so it makes sense to adapt any defaults between the two main entities. Special configs (like for FPGA) should be the exception, not the norm. Otherwise we need to keep doing the same change for all new platforms..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i updated, thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

FPGA does need 5000ms, in future, if SOF need run on FPGA again, we'd better to have a mechanism to change it back.

The CONFIG_SECONDARY_CORE_DISABLING_TIMEOUT is for FW to do secondary
core disabling check and set to 5000ms by default. Linux driver
set ipc timeout duration to 500ms, but FW wait 5000ms in
cpu_disable_core for SET_DX ipc message. This makes driver stop but fw
is still waiting. Actually the disabling can be successful in far less
than 5000ms and it was first designed for FPGA case. Now change it to
400ms to make debugging easier.

Signed-off-by: Rander Wang <[email protected]>
@RanderWang RanderWang force-pushed the disable_secondary_core branch from cc5c9a5 to 5d3c504 Compare September 5, 2023 08:24
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thanks @RanderWang !

@kv2019i kv2019i merged commit bb5f0d9 into thesofproject:main Sep 6, 2023
40 of 41 checks passed
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] IPC timeout check mismatch between kernel and fw
4 participants