Skip to content
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

core: callout: disable obsolete timeouts #6812

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/kernel/callout.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ void callout_service_cb(void)
* schedule_next_timeout() saves the core it was last
* called on. If there's a mismatch here it means that
* another core has been scheduled for the next callout, so
* there's no work to be done for this core.
* there's no work to be done for this core and we can
* disable the timeout on this CPU.
*/
cpu_spin_lock(&callout_sched_lock);
do_callout = (get_core_pos() == callout_sched_core);
if (!do_callout)
desc->disable_timeout(desc);
cpu_spin_unlock(&callout_sched_lock);
if (!do_callout)
return;
Expand Down