Uh oh!
There was an error while loading. Please reload this page.
scheduler: check task state prior to completion - #739
Conversation
lgirdwood
commented
Dec 17, 2018
@ranj063 compile tested only, can you check and stress it. Better fix. |
ranj063
commented
Dec 17, 2018
@lgirdwood this looks correct. I will kick off the stress test this morning on my boards. Thanks! |
There was a problem hiding this comment.
@lgirdwood what if the task state changes to pending because of the race condition we saw earlier. We will still end up setting it to completed and miss the next ipc task.
There was a problem hiding this comment.
Potentially if the schedule time for the next task is quite close and in this case it is immediately :
void ipc_schedule_process(struct ipc *ipc)
{
schedule_task(&ipc->ipc_task, 0, 100);
}
We need to relax this as IPC is never that high priority. Added PENDING case and pushed.
There was a problem hiding this comment.
@lgirdwood I will add case TASK_STATE_PENDING as well for the "do nothing" part and start the stress test.
High priority IRQ handlers can potentially reschedule tasks prior to task completion. i.e. 1. Task runs and unmasks high priority IRQ prior to completion. 2. High priority IRQ prempts task context and reschedules task (changing task->state). 3. Initial task resumes and then completes (clobbering task->state in 2). Make sure this flow is supported for high priority IRQ scheduling. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
9817973 to
7589ff6Compareranj063
commented
Dec 18, 2018
@lgirdwood ever since we made the scheduler changes, I seem to be hitting IPC timeouts with CTX_SAVE ipc. |
michalgrodzicki
commented
Dec 18, 2018
@lgirdwood could you please fix unit tests? |
jocelyn-li
commented
Dec 18, 2018
@lgirdwood This patch breaks Unit tests. Please fix the unit test failure. |
lgirdwood
commented
Dec 18, 2018
@michalgrodzicki@jocelyn-li unit tests failed due to commit f00d46b. |
ranj063
commented
Dec 19, 2018
@lgirdwood this PR is good to be merged once the CI passes. Thanks! |
mengdonglin
commented
Dec 19, 2018
@lgirdwood Would you please merge this PR? Firmware team will cherry pick it to GLK release branch glk-005-drop-stable. |
High priority IRQ handlers can potentially reschedule tasks prior to task
completion. i.e.
task->state).
Make sure this flow is supported for high priority IRQ scheduling.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com