Skip to content

Commit

Permalink
🐛 preempted-postpone even when preemption disabled. (#738)
Browse files Browse the repository at this point in the history
When a task is preempted, it needs to be postponed for a short duration
to prevent thrashing. Since individual tasks may override the _global_
preempt policy, the postpone must happen regardless.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
  • Loading branch information
jortel authored and web-flow committed Aug 5, 2024
1 parent 15b11a8 commit e87cad4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions task/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ type RulePreempted struct {
// Postpone based on a duration after the last preempted event.
func (r *RulePreempted) Match(ready, _ *Task) (matched bool, reason string) {
preemption := Settings.Hub.Task.Preemption
if !preemption.Enabled {
return
}
mark := time.Now()
event, found := ready.LastEvent(Preempted)
if found {
Expand Down

0 comments on commit e87cad4

Please sign in to comment.