Repository navigation
pipeline: always begin scheduling from the source - #5000
Conversation
There was a problem hiding this comment.
lets have a comment why we are doing this check
There was a problem hiding this comment.
sorry, not following - this looks like we are changing where we insert this pipeline into the list of pipelines and how does this relate to copy direction and also to pipeline priority ?
There was a problem hiding this comment.
no, this is not directly for scheduling yet, priorities will be taken into account later. This is a list, from which tasks will be taken one-by-one for submission to the scheduler, which then will order them by priority. So the order in this list only matters as long as they all have the same priority, and they do.
There was a problem hiding this comment.
@lyakh i think we should enhance the documentation about scheduling and how copy function works across pipeline components.
I was under the impression that with a normal Host -> Volume -> DAI pipeline the copy() function for Host() always got called first.
There was a problem hiding this comment.
@dbaluta yes, you're right, this is not the final version yet (as the "draft" status is also saying ;-) ), please wait, I think I have a better one now, I'll clean it up and push tomorrow.
bf7e93d to
91ff63d
Compare
|
the latest CI run with multiple-pipeline-pause-resume stress-testing passed, we can start reviewing now |
|
CI failures:
|
lgirdwood
left a comment
There was a problem hiding this comment.
Can you split this PR up, some can be merged now. i.e. we need the BYT fix for rc1.
|
|
removed the cherrytrail fixup commit from this PR again. This will temporarily break CI, until #5014 is merged |
|
hi @lyakh FYI , I just run some multiple-pause-resume testcanses on some nocodec platforms |
Currently when a multi-pipeline stream starts, the first scheduler run will process the START trigger in the context of the first pipeline, then the next pipeline task within the same scheduler run will already attempt to copy data. This cannot work because the first pipeline hasn't copied its data yet. Make sure to skip the first scheduler run completely on all pipelines. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When processing a PAUSE or a STOP trigger in the pipeline task, if the pipeline aborts processing of the trigger, it has to proceed executing the copy() flow instead of skipping the tick. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
schedule_task_cancel, schedule_task_free and schedule_task are compulsory scheduler operations. Verify them once during scheduler registration and don't check them afterwards when calling. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
|
This version of the PR has commits from other PRs in it too for testing |
|
CI unrelated: |
Sometimes multiple tasks have to be scheduled together - one after another and in a specific order. Add two order-enforcing functions for that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add support for order-enforcing scheduling to the ll-scheduler. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
struct pipeline_task and pipeline_task_get() belong to the pipeline API, not to the scheduler API. Move them to pipeline.h Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Tasks currently have 9 states defined for them, but they all can be divided into two groups: active and passive. We define all tasks on a scheduler queue as active. All other tasks are passive. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Connected pipelines have to be scheduled in a specific order, depending on the direction of the data flow. Use the new schedule_task_before() / schedule_task_after() API for that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Current logic in schedule_ll_domain_set() checks a newly submitted periodic task if it has to be scheduled before an existing one. However, when doing this the algorithm might schedule the new task a whole period earlier than would normally be acceptable. Fix this by adding the missing period delay. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Sometimes multiple tasks must be scheduled on the same domain tick. Use the reference task pointer for such cases. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Pipeline tasks are scheduled in the order in which they're submitted to the scheduler. When audio streams cross several pipelines it makes sense to begin scheduling from the data source. I.e. for playback pipelines from the host pipeline, for capture pipelines from the DAI pipeline. Currently the DAI pipeline gets scheduled first for both playback and captuure, which for playback always results in a
warning being printed for the first copy attempt. Also, this results in delayed scheduling: the first cycle will then only copy data from the host, so the first real DAI copying will only happen on the second tick.
On the contrary, when stopping to stream, the sink should be stopped first.
This patch takes the streaming direction and the command into account when scheduling tasks.