-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Use a queue to keep track of running and blocked tasks in rust_sched_loop #2100
Conversation
…loop. Create a new data structure called rust_task_queue that holds a circular doubly linked list of tasks. This is used in rust_sched_loop to keep track of running and blocked tasks, moving tasks between the two lists should be more efficient.
also, if this lands then it looks like rt/util/index_list.h and rt/util/synchronized_indexed_list.h can be removed entirely. |
After thinking about this more at lunch I'm still not convinced that either way is better. One we add automatic preemption points and time slice accounting the way that tasks are scheduled will need to change again. I do like the idea of getting rid of indexed_list and synchronized_indexed_list. I'm not even sure what synchronized_indexed_list is used for and why. |
synchronized_indexed_list isn't used anywhere and could probably be removed regardless. |
This approach turned out to be wrong. We are not going to merge it. Please accept my apologies. |
no problem! |
I originally had the linked list logic in sched_loop but it was messy, so I moved it out to a separate data structure class. Not sure how worth it this will be when blocked_tasks gets removed altogether, but here it is.
Fixes #2028