Skip to content

timer_domain: bring the timer_domain_unregister() back - #4885

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
keyonjie:main
Oct 25, 2021
Merged

lgirdwood merged 2 commits into
thesofproject:mainfrom
keyonjie:main

Conversation

@keyonjie

@keyonjie keyonjie commented Oct 18, 2021 •

Copy link
Copy Markdown
Contributor
This partially revert the below commit, to bring the regitser/unregister
symmetry back with restore the timer_domain_unregister() implementation:

commit d4fd1b3 ("timer_domain: don't unregister interrupt handler from itself")

Keep the task in the list and the subsequent call to
schedule_ll_task_cancel() will clean it up.

Remove the operation in schedule_ll_task_done() to avoid double
cleaning, and unregistering from the interrupt handler itself won't
happen anymore.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This partially revert the below commit, to bring the regitser/unregister
symmetry back with restore the timer_domain_unregister() implementation:

commit d4fd1b3 ("timer_domain: don't unregister interrupt handler from itself")

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
@lgirdwood
lgirdwood requested a review from lyakh October 18, 2021 14:17
@lgirdwood

Copy link
Copy Markdown
Member

@lyakh whats the rational here ?
@keyonjie is this reverting two patches ? We are trying to simplify and move the scheduling, timer APIs towards Zephyr so it's a gradual step by step process.

@keyonjie

Copy link
Copy Markdown
Contributor Author

@lyakh whats the rational here ? @keyonjie is this reverting two patches ? We are trying to simplify and move the scheduling, timer APIs towards Zephyr so it's a gradual step by step process.

only partially revert commit d4fd1b3 ("timer_domain: don't unregister interrupt handler from itself"), and provide another solution to the crash issue @lyakh mentioned in his previous PR.

@lyakh

lyakh commented Oct 19, 2021

Copy link
Copy Markdown
Collaborator

@lgirdwood @keyonjie see #4856 (comment) - I'm not certain task_calcel() is always called.

@keyonjie
keyonjie requested a review from ranj063 October 22, 2021 03:00
@keyonjie
keyonjie marked this pull request as ready for review October 22, 2021 03:00
@keyonjie
keyonjie requested a review from mrajwa as a code owner October 22, 2021 03:00
@ranj063

ranj063 commented Oct 22, 2021

Copy link
Copy Markdown
Collaborator

@lgirdwood @lyakh the commit commit d4fd1b3 ("timer_domain: don't unregister interrupt handler from itself") breaks multi-core playback on the ADL nocodec topology for me. This PR fixes it.

list_item_del(&task->list);

domain_unregister(sch->domain, task, atomic_sub(&sch->num_tasks, 1) - 1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this function is now only called once and only prints traces, maybe you could remove it completely and move prints directly into the caller

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this function is now only called once and only prints traces, maybe you could remove it completely and move prints directly into the caller

How about let's keep it at the moment for better bisection.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@keyonjie I've investigated the conflict between this PR and my now reverted #4724. As you know, the latter is moving TRIGGER_STOP handling into the pipeline task. That way the pipeline task itself processes the trigger and completes and yes, in that case there is no call to schedule_task_cancel() exactly because you don't want to cancel the task from itself, potentially deregistering the interrupt handler from itself.
Let's try to understand better what this PR was trying to fix. I see a comment from @ranj063 that this fixes "multicore playback" on ADL. What exactly does that mean? Running multiple-pipeline-playback.sh on a multicore topology? The SOF upstream after d4fd1b3 was broken or upstream plus multicore coherency API? Do we know how the breakage was happening?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@keyonjie I've investigated the conflict between this PR and my now reverted #4724. As you know, the latter is moving TRIGGER_STOP handling into the pipeline task. That way the pipeline task itself processes the trigger and completes and yes, in that case there is no call to schedule_task_cancel() exactly because you don't want to cancel the task from itself, potentially deregistering the interrupt handler from itself. Let's try to understand better what this PR was trying to fix. I see a comment from @ranj063 that this fixes "multicore playback" on ADL. What exactly does that mean? Running multiple-pipeline-playback.sh on a multicore topology? The SOF upstream after d4fd1b3 was broken or upstream plus multicore coherency API? Do we know how the breakage was happening?

@lyakh it broke the upstream + multi-core nocodec (multi-core + dynamic ppl actually) topology, normal playback or capture fails.

@keyonjie

Copy link
Copy Markdown
Contributor Author

SOFCI TEST

@lgirdwood
lgirdwood merged commit b0cb159 into thesofproject:main Oct 25, 2021
@marc-hb

marc-hb commented Nov 2, 2021

Copy link
Copy Markdown
Collaborator

Alloc failure #4929 bisected to this.

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.

5 participants