-
Notifications
You must be signed in to change notification settings - Fork 349
Pipeline scheduling #4471
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
Pipeline scheduling #4471
Conversation
|
this survived "run-all-tests.sh -l 1" in a Zephyr build with only expected failures: xrun-inject, ipc-flood, kmod and suspend-resume-with-*. |
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need some more comments describing the flows and transitions and rules.
src/drivers/intel/cavs/ipc.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this patch in another PR ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I closed #4469
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood what do you think about this change - does it seem safe to you? @ranj063 expressed some concerns in #4469 (comment)
src/drivers/intel/cavs/ipc.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also looks similar to the other PR ?
src/drivers/intel/cavs/ipc.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh how about moving the power_off to be the first thing in platform_complete_cmd(). That way we'd still have the same sequence as before ie power off and then send the host notification?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ranj063 but then what's the point of this patch? :-) The whole idea was to make sure we acknowledge the completion of the IPC to the host, so that it doesn't run onto an IPC timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this patch is not critical. CTX_SAVE IPC is always executed on core 0 anyway
src/idc/idc.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW @lyakh I assume you have tested this change with xtos too and not just zephyr? It looks correct for sure but we dont have a topology in CI with multi-core. So just wanted to make sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh I tested this PR with my multi-core topology and it passed with flying colors! good to go!
|
@lyakh looks good on all platforms except legacy ? can you check, it could be topology is using DMA driver, whereas they can support timer driven too. |
@lgirdwood I'm wondering: with this PR TRIG_START doesn't trigger components from the IPC, instead when the pipeline task is scheduled for the first time, then TRIG_START is sent to all components. But when using the DMA domain, isn't DMA scheduling started from scheduling component's TRIG_START? So, the task never gets scheduled? I can of course make this decision to postpone TRIG_START depend on timer or Zephyr LL-scheduling domain... |
|
This PR now has 2 issues:
|
Doesn't work, the clock IP is still ON and asserts an IRQ. The clock must be OFF so no IRQ is asserted. Btw, not following why power OFF is related to this PR for LL triggering ?
|
I understand, but IRQs will be off at the DSP level, so the DSP won't be interrupted. Or do you mean it still somehow breaks at the hardware level?
Not to LL triggering, but this PR also contains a patch for power off sequence. Yes, it is unrelated to the PR, I can drop it from here. |
Yes, HW level blocker. |
Don't have time to review details yet, but yes, let's NOT merge this until the DMA scheduling domain issues are fixed. |
keyonjie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not merge it before regressions on DMA domain addressed.
pipeline_task_init() is always called with pipeline_task as its last parameter. Remove the parameter and use the function explicitly. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use bool type for boolean flags, split some too long lines, merge some needlessly split lines. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1a9f528 to
6e44891
Compare
@keyonjie this version should leave DMA domain pipelines unchanged. |
When the firmware receives a START or RELEASE IPC message, it immediately triggers all involved components, which starts DMA. Then it schedules the pipeline task, but since the scheduler can be already running at that time, the task might be scheduled when DMA data isn't available yet or has already overflowed. To fix this change the control flow to also trigger all components from the task during its first run. Actual data processing then begins with the next period. Note, that this is currently only possible with pipelines, using timer-based scheduling. Pipelines, using DMA interrupts for scheduling are unaffected. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
|
CI shows unrelated CML kernel PM failure. |
Run trigger START and RELEASE in the pipeline task context