Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The task here is the role of the preemptor, and
task.Preemptable
indicates whether the current task is allowed to be preempted.Sorry, I don't quite understand the purpose of the judgment here.
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.
Main idea of this PR, that preemptable tasks can skip this proportional check, because they can be preempted, so there are no problem to schedule them. In system which I maintain in my organisation should be available ability to schedule preemptible tasks bypassing proportional plugin.
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.
Thanks for your response, I see what you mean.
However, the proportional logic is designed to ensure that resources are available in the allocate scene, and is not bound to preempt. In reality, many users will not configure preempt actions.
I am worried that the modification here will affect the existing proportional function. So I have reservations about the current pr, and I can refer to the ideas of other contributors in the community.
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.
Maybe we can add an optional parameter to proportional plugin configuration, which by default will save current behavior but allow to enable changes made by this pr?
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.
It sounds more reasonable to add a config. And what's more, job's queue should support
Reclaimable
so that the job in this queue can be reclaimed.