-
Notifications
You must be signed in to change notification settings - Fork 124
WQ: Iterate whole ready list if task priority has been set #4279
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
base: master
Are you sure you want to change the base?
WQ: Iterate whole ready list if task priority has been set #4279
Conversation
btovar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready to merge?
|
Hold on a minute... |
|
I don't think |
|
You're right I think. Maybe I can just switch back to list_iterate |
|
list_rotate was added for performance advantages, right? |
|
That could get complicated quickly if we are pushing new tasks with priorities while the list is out of order |
68b764b to
1a7b200
Compare
|
We can avoid the code duplication if you use a function pointer for whether to use list_nextitem or list_rotate, and update q->attempt_schedule_depth to the length of the ready_queue every time when using priorities. |
|
Is it necessary to call list_first_item before iterating the list normally? |
|
Careful! You are iterating over the list but using |
Proposed Changes
Addresses #4276
We cannot partially iterate the ready list and leave it out of order if we wish to maintain priority scheduling. If a task priority is set by the user, revert to iterating the entire list each scheduling attempt.
Merge Checklist
The following items must be completed before PRs can be merged.
Check these off to verify you have completed all steps.
make testRun local tests prior to pushing.make formatFormat source code to comply with lint policies. Note that some lint errors can only be resolved manually (e.g., Python)make lintRun lint on source code prior to pushing.