You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CML][BUG ]Multi-pipeline: all streams killed when DSP core utilisation > 100% #2280
Describe the bug
Multi-pipeline display "input/output error" when playback/capture more than 6 piplines at the same time. Aplay/arecord function can't be effected after issue occured. Can recover it if playback/capture not more than 6 piplines.
changed the title [-][CML][BUG]Multipipe display "input/output error" when aplay/arecord is more than 6 pipleline[/-][+][CML][BUG]Multi-pipeline display "input/output error" when aplay/arecord is more than 6 pipleline[/+]on Jan 13, 2020
changed the title [-][CML][BUG]Multi-pipeline display "input/output error" when aplay/arecord is more than 6 pipleline[/-][+][CML][BUG]Multi-pipeline display "input/output error" when playback/capture more than 6 piplines at the same time[/+]on Jan 13, 2020
on this hardware there are 3 playback devices and 2 capture ones.
What you are doing is enabling all of them, and then add HDMI.
I suspect you must run out of resources at some point and underflow. That would explain why there's no error in dmesg, but you consistently cannot play
Rather than using a scripts, please try manually adding a stream for each of the devices in a different ssh terminal, and send the logs when the error happen (terminal output, dmesg logs, DSP logs).
Run 6 multipiplines aplay/arecord at the same time, and switch aplay0,2(RT1308) to background, and back to foreground can also cause IO error.
May be related to this issue?
@YvonneYang2 yep, any EDF overload will currently kill all streams and this is currently showing in low power clock mode. We are looking at EDF resource management.
@lgirdwood@lbetlej What is the expectation here? Pipelines are scheduled with low latency scheduler (timer) and not with EDF, so EDF resource management won't help here. I imagine that the first step would be to review what pipelines are run and measure their cycles. We need to assess whether some of the components are not optimized. Assuming everything will look correct, I think the resource management should be manually set based on worst case scenario and taking into consideration topology and clock settings. If we want to keep lower clock, that's OK, but some of the pipelines should be started on slave cores.
Test with sof-dev (commit:d05959) +master (commit:8e5ab9c), issue also can be reproduced on TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode when playback/capture more than 5 piplines at the same time.
@tlauda we do need resource management, i.e. each component has a measured worst case cost per number of samples per platform. e.g volume 24bit cost on platform X is Y cycles. This can then bo worked out at runtime and rejected if new load + current load > budget.
@lgirdwood@lauda resource management is an interesting topic itself:
I'm with you on component level worst case compute requirements for each audio format
The measurement process has to account: DSP configuration, SRAM memory access time (waitstates) and cache worst case latency for each audio format (SRC as an example)
The worst case utilization has to be visible at 2 levels:
topology so that during topology creation the system integrator can verify if the workload fit's in DSP
at FW level to verify if new pipeline is exceeding compute budget
Activity
[-][CML][BUG]Multipipe display "input/output error" when aplay/arecord is more than 6 pipleline[/-][+][CML][BUG]Multi-pipeline display "input/output error" when aplay/arecord is more than 6 pipleline[/+][-][CML][BUG]Multi-pipeline display "input/output error" when aplay/arecord is more than 6 pipleline[/-][+][CML][BUG]Multi-pipeline display "input/output error" when playback/capture more than 6 piplines at the same time[/+]sinahuang commentedon Jan 14, 2020
This issue is caused by commit 91fb594
ClarexZhou commentedon Jan 14, 2020
@mmaka1 could you please check first?
paulstelian97 commentedon Jan 14, 2020
Is it possible to dynamically use a different oscillator dependent on load? As in using the higher performance one when there is need.
lgirdwood commentedon Jan 14, 2020
@plbossart any ideas, nothing obvious in any of the logs. Not sure yet if it's SDW only.
lgirdwood commentedon Jan 14, 2020
@sinahuang can you retry this with 2,3,4,5 streams - it may still be an issue with less streams.
sinahuang commentedon Jan 15, 2020
Test with 2,3,4,5 streams, issue can't be reproduced. Issue only can be reproduced when more than 6 piplines.
plbossart commentedon Jan 15, 2020
on this hardware there are 3 playback devices and 2 capture ones.
What you are doing is enabling all of them, and then add HDMI.
I suspect you must run out of resources at some point and underflow. That would explain why there's no error in dmesg, but you consistently cannot play
Rather than using a scripts, please try manually adding a stream for each of the devices in a different ssh terminal, and send the logs when the error happen (terminal output, dmesg logs, DSP logs).
sinahuang commentedon Jan 15, 2020
On CML-H Laptop there are 5 playback devices and 2 capture ones.
If I manually adding a stream for each of the devices in a different ssh terminal, the error happened after added the 7th devices.
dmesg logs:
dmesg.log
kern.log
sof_error_trace.log
Terminal output:
13 remaining items
YvonneYang2 commentedon Jan 19, 2020
Run 6 multipiplines aplay/arecord at the same time, and switch aplay0,2(RT1308) to background, and back to foreground can also cause IO error.
May be related to this issue?
e.g
Terminal 1: aplay -Dhw:0,0 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i
Terminal 2: aplay -Dhw:0,2 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i
Terminal 3: aplay -Dhw:0,6 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i
Terminal 4: aplay -Dhw:0,7 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i
Terminal 5: arecord -Dhw:0,1 -r48000 -c2 -fs16_le test1.wav -vv -i
Terminal 6: arecord -Dhw:0,4 -r48000 -c2 -fs16_le test4.wav -vv -i
Switch aplay0,2(RT1308) to background, and back to foreground in terminal 2, IO error occurred.
dmesg.log
sof_trace.log
Test recipe:
Kernel: https://github.com/thesofproject/linux/commits/topic/sof-dev (commit: 674afed)
FW: https://github.com/thesofproject/sof/commits/master commit: 415273f
Platform: CML-U sdw laptop
lgirdwood commentedon Jan 20, 2020
@YvonneYang2 yep, any EDF overload will currently kill all streams and this is currently showing in low power clock mode. We are looking at EDF resource management.
lgirdwood commentedon Jan 27, 2020
EDF resource management target v1.6
tlauda commentedon Mar 10, 2020
@lgirdwood @lbetlej What is the expectation here? Pipelines are scheduled with low latency scheduler (timer) and not with EDF, so EDF resource management won't help here. I imagine that the first step would be to review what pipelines are run and measure their cycles. We need to assess whether some of the components are not optimized. Assuming everything will look correct, I think the resource management should be manually set based on worst case scenario and taking into consideration topology and clock settings. If we want to keep lower clock, that's OK, but some of the pipelines should be started on slave cores.
sinahuang commentedon Mar 11, 2020
Test with sof-dev (commit:d05959) +master (commit:8e5ab9c), issue also can be reproduced on TGL-U RVP with codec ALC711 in SDW mode and RT1308 in I2S mode when playback/capture more than 5 piplines at the same time.
lgirdwood commentedon Mar 12, 2020
@tlauda we do need resource management, i.e. each component has a measured worst case cost per number of samples per platform. e.g volume 24bit cost on platform X is Y cycles. This can then bo worked out at runtime and rejected if new load + current load > budget.
lbetlej commentedon Mar 12, 2020
@lgirdwood @lauda resource management is an interesting topic itself:
mengdonglin commentedon Mar 24, 2020
Caused by DSP overload, please see comments of @tlauda #2531 (comment)
slawblauciak commentedon Apr 7, 2020
@sinahuang should no longer occur on master, high performance clock is enabled by default
sinahuang commentedon Apr 7, 2020
Issue can't be reproduced with sof-dev commit:052e45d and master commit: b4e8b1e on on CML-H and CML-U, so closed it.