Skip to content

Commit 92a64d8

Browse files
committed
Update toc
1 parent 1572942 commit 92a64d8

File tree

1 file changed

+5
-3
lines changed
  • keps/sig-scheduling/5142-pop-backoffq-when-activeq-empty

1 file changed

+5
-3
lines changed

keps/sig-scheduling/5142-pop-backoffq-when-activeq-empty/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ tags, and then generate with `hack/update-toc.sh`.
2727
- [A tiny delay on the first scheduling attempts for newly created pods](#a-tiny-delay-on-the-first-scheduling-attempts-for-newly-created-pods)
2828
- [Backoff won't be working as a natural rate limiter in case of errors](#backoff-wont-be-working-as-a-natural-rate-limiter-in-case-of-errors)
2929
- [One pod in the backoffQ could starve the others](#one-pod-in-the-backoffq-could-starve-the-others)
30+
- [Low priority pod could be chosen to pop, even if high priority pod has a slightly later backoff expiration](#low-priority-pod-could-be-chosen-to-pop-even-if-high-priority-pod-has-a-slightly-later-backoff-expiration)
3031
- [Design Details](#design-details)
3132
- [Popping from the backoffQ in activeQ's pop()](#popping-from-the-backoffq-in-activeqs-pop)
3233
- [Notifying activeQ condition when a new pod appears in the backoffQ](#notifying-activeq-condition-when-a-new-pod-appears-in-the-backoffq)
3334
- [Calling PreEnqueue for the backoffQ](#calling-preenqueue-for-the-backoffq)
35+
- [Change backoffQ less function](#change-backoffq-less-function)
3436
- [Test Plan](#test-plan)
3537
- [Prerequisite testing updates](#prerequisite-testing-updates)
3638
- [Unit tests](#unit-tests)
@@ -177,7 +179,7 @@ Flushing from backoffQ to activeQ is done each second, taking all pods with back
177179
It means that, when they come to activeQ, they are sorted by priority there and taken in this order from activeQ.
178180
It is important, because preemption of a lower priority pod could happen if a higher priority pod is scheduled later.
179181

180-
To mitigate this, key function of backoffQ's heap will be changed, quantifying the time to make one second windows in which pods will be sorted by priority.
182+
To mitigate this, `lessFn` function of backoffQ's heap will be changed, quantifying the time to make one second windows in which pods will be sorted by priority.
181183
Those whole windows will be eventually flushed to activeQ, making no change in current behavior.
182184

183185
## Design Details
@@ -211,10 +213,10 @@ Also, it means we'd have two paths that `PreEnqueue` plugins are invoked: when n
211213
and when pods are pushed into the backoffQ.
212214
At the moveToActiveQ level, these two paths could be distinguished by checking if the event is equal to `BackoffComplete`.
213215

214-
### Change backoffQ key function
216+
### Change backoffQ less function
215217

216218
As [mentioned](#low-priority-pod-could-be-chosen-to-pop-even-if-high-priority-pod-has-a-slightly-later-backoff-expiration) in risks,
217-
backoffQ's heap key function has to be changed to apply priority within 1 second windows.
219+
backoffQ's heap `lessFn` function has to be changed to apply priority within 1 second windows.
218220
The actual implementation takes backoff expiration times of two pods and compares which is lower.
219221
The new version will cut the milliseconds and use priorities to compare pods within those windows.
220222
To make ordering predictable, in case of equal priorities within the same window,

0 commit comments

Comments
 (0)