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

Make schedule_thread take suspended threads into account #3233

Merged
merged 3 commits into from Mar 18, 2018

Conversation

msimberg
Copy link
Contributor

This was an oversight when doing thread suspension, and makes sure create_thread and schedule_thread behave the same way in terms of not scheduling on suspended threads.

Proposed Changes

  • Add a select_active_pu function to scheduler_base which accepts an initial thread number (this one is tried first, others are tried sequentially, wrapping around when needed), and an optional fallback thread number (used in case locks can't be taken immediately to avoid looping forever; the fallback is used in scheduling_loop to avoid looping for too long when the current pu could do work)
    • None of the above is done if elasticity is disabled

@hkaiser hkaiser added this to the 1.1.0 milestone Mar 13, 2018
Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@hkaiser hkaiser merged commit 6350c24 into STEllAR-GROUP:master Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants