-
Notifications
You must be signed in to change notification settings - Fork 299
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
Fix using PrioritySortingWithinCohort=false and borrowWithinCohort #2807
Fix using PrioritySortingWithinCohort=false and borrowWithinCohort #2807
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mimowo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/test pull-kueue-test-integration-main |
093cad0
to
d079c97
Compare
42c5add
to
9c75489
Compare
9c75489
to
ef58531
Compare
ef58531
to
f09db5f
Compare
/assign @gabesaba |
/cc @PBundyra |
Could you please describe the mechanism in description behind preventing the infinite loop? Especially which workload does Kueue should admit after the changes |
How do we estimate that 1ms will be enough to put the preemptor in front of the workload being preemtepted? |
Good idea, I have updated the "Special notes for your reviewer:" section. PTAL. |
Yes, any epsilon would be enough. This is just to discriminate them in scenario when the creation timestamp of the preemptor equals eviction timestamp of the preempted workload. This is a practical possibility which was discovered by the integration test when I was running it in a loop. It would not be end of the world - the preempted workload-A in practice would get admitted and preempted again. Eventually its eviction timestamp would be greater than the creation timestamp of |
Thank you, LGTM |
/lgtm |
LGTM label has been added. Git tree hash: 39f12fcb2958cf47566f8609c908a9c6c828a1e7
|
/cherry-pick release-0.8 |
@mimowo: once the present PR merges, I will cherry-pick it on top of release-0.8 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@mimowo: new pull request created: #2830 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/release-note-edit
|
/kind bug |
What type of PR is this?
What this PR does / why we need it:
To prevent infinite preemption loop when borrowWithinCohort is used with
PrioritySortingWithingCohort=false
Which issue(s) this PR fixes:
Fixes #2821
Special notes for your reviewer:
In the scenario described in #2821 when
PrioritySortingWithingCohort=false
we re-admit repeatedly workload-A (lower priority) which blocks the admission of the Workload-B2 (higher priority).Ideally, we would like workload-B to be scheduled, which would break the cycle. Workload-B2 would not get preempted by Workload-A.
The code that is important for relative prioritization of the two workloads is here:
Workload-A
andWorkload-B2
need to borrow to get admittedPrioritySortingWithingCohort=false
so this block is not relevantWorkload-A
currently "wins" here because it is olderThe idea for the fix in to modify the formula for
GetQueueOrderTimestamp
at the last step and use the timestamp to discriminate in favor ofWorkload-B2
. In this order we use theEvictionTimestamp
rather than creation timestamp. This idea is not entirely new as we do something similar to penalize workload evicted due to PodsReady timeout already.Does this PR introduce a user-facing change?