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

tools: sof_perf_analyzer: change module CPC calculation #1136

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

btian1
Copy link
Contributor

@btian1 btian1 commented Dec 1, 2023

Previously, module CPC is calculated by multiplying the mean value of cpu_peak with a margin scalar, however, abnormal peak cycles are finally proved that it is caused by IRQ, with further team discussion, an agreement was reached to use module average multiplied with a margin as new way for CPC calculation.

@btian1 btian1 requested a review from a team as a code owner December 1, 2023 07:47
@marc-hb
Copy link
Collaborator

marc-hb commented Dec 1, 2023

Is this basically hiding very short audio glitches?

https://bravenewgeek.com/everything-you-know-about-latency-is-wrong/

@btian1
Copy link
Contributor Author

btian1 commented Dec 4, 2023

Is this basically hiding very short audio glitches?

https://bravenewgeek.com/everything-you-know-about-latency-is-wrong/

@marc-hb , I am not able to open this link, could you stick to this PR itself? does above link related with this PR?

Copy link

@aiChaoSONG aiChaoSONG left a comment

Choose a reason for hiding this comment

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

code looks good, let's revise commit message a little bit:

In daily performance test, we have a high and abnormal peak
cycle for some module, recently, we find this abnormal peak
cycle is caused by IRQ.

Previously, module CPC is calculated by multiplying the mean
value of cpu_peak with a margin scalar. With further team
discussion based on the new finding, an agreement is reached
to use the product of module average cycle and a margin as
module CPC.

@marc-hb
Copy link
Collaborator

marc-hb commented Dec 5, 2023

@marc-hb , I am not able to open this link, could you stick to this PR itself?

I'm not sure about the copyright sorry. I never had any problem loading that page.

does above link related with this PR?

Yes, it explains that averages are generally useless. Even more useless in "real-time" situation like audio .

@aiChaoSONG
Copy link

With further team discussion based on the new finding, an agreement is reached
to use the product of module average cycle and a margin as module CPC.

Can we have at lease one team member that agrees with this method review this pull request?

@mengdonglin
Copy link
Contributor

@lgirdwood has agreed to use average cycles with a fix ratio for CPC to upstream in FW manifest. So that we can use CPC in FW manifest to monitor potential performance regression in daily performance test in the future.

So the method in this PR 'CPC = AVG(module) * CPC_MARGIN' with CPC_MARGIN =1.5 looks good to me. @aiChaoSONG @marc-hb

In daily performance test, we have a high and abnormal peak
cycle for some module, recently, we find this abnormal peak
cycle is caused by IRQ.

Previously, module CPC is calculated by multiplying the mean
value of cpu_peak with a margin scalar. With further team
discussion based on the new finding, an agreement is reached
to use the product of module average cycle and a margin as
module CPC.

Signed-off-by: Baofeng Tian <[email protected]>
@aiChaoSONG
Copy link

Failure not related

@aiChaoSONG aiChaoSONG merged commit d6ae791 into thesofproject:main Dec 5, 2023
4 of 6 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.

4 participants