Skip to content

Commit 2304806

Browse files
committed
elaborate comment more
1 parent fa8da84 commit 2304806

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/scheduler/internal/queue/scheduling_queue.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,15 @@ func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(logger klog.Logger, podIn
11941194

11951195
activated := false
11961196
for _, pInfo := range podInfoList {
1197+
// When handling events takes time, a scheduling throughput gets impacted negatively
1198+
// because of a shared lock within PriorityQueue, which Pop() also requires.
1199+
//
11971200
// Scheduling-gated Pods never get schedulable with any events,
11981201
// except the Pods themselves got updated, which isn't handled by movePodsToActiveOrBackoffQueue.
1199-
// So, here we skip them early here so that they don't go through isPodWorthRequeuing,
1202+
// So, we can skip them early here so that they don't go through isPodWorthRequeuing,
12001203
// which isn't fast enough when the number of scheduling-gated Pods in unschedulablePods is large.
1204+
// This is a hotfix, which might be changed
1205+
// once we have a better general solution for the shared lock issue.
12011206
//
12021207
// Note that we cannot skip all pInfo.Gated Pods here
12031208
// because PreEnqueue plugins apart from the scheduling gate plugin may change the gating status

0 commit comments

Comments
 (0)