Skip to content

sched/sched: address performance concerns for sched_lock in non-SMP case #9039

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

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

pkarashchenko
Copy link
Contributor

Summary

Address performance concerns from #7464

Impact

sched_lock/sched_unlock should work as fast as before.

Testing

Pass ostest from apache/nuttx-apps#1711

@pkarashchenko pkarashchenko requested a review from davids5 April 18, 2023 21:16
@pkarashchenko
Copy link
Contributor Author

@davids5 Please take a look if this solution is better

@pkarashchenko pkarashchenko marked this pull request as ready for review April 18, 2023 21:18
@pkarashchenko pkarashchenko marked this pull request as draft April 18, 2023 21:22
@davids5
Copy link
Contributor

davids5 commented Apr 19, 2023

@pkarashchenko
Are there more cases then:

  1. The normal case sched lock prevents preemption from interrupts because we do not reprioritize while locked.
  2. The case is that a call to change priority while locked must be accepted but delayed. But in fact this can only be the current task that is running and has locked.

Are there more?

@pkarashchenko pkarashchenko marked this pull request as ready for review April 25, 2023 14:00
@pkarashchenko
Copy link
Contributor Author

@pkarashchenko Are there more cases then:

  1. The normal case sched lock prevents preemption from interrupts because we do not reprioritize while locked.
  2. The case is that a call to change priority while locked must be accepted but delayed. But in fact this can only be the current task that is running and has locked.

Are there more?

  1. The shed_lock() does nothing when called from an interrupt
  2. This is addressed by sched: fix context switching with locked scheduler #7464 and improved in this PR.

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.

3 participants