preemptioncommon

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CandidatesOrdering added in v0.12.9

func CandidatesOrdering(log logr.Logger, afsEnabled bool, a, b *workload.Info, cq kueue.ClusterQueueReference, now time.Time) int

CandidatesOrdering criteria: 0. Workloads already marked for preemption first. 1. Workloads from other ClusterQueues in the cohort before the ones in the same ClusterQueue as the preemptor. 2. (AdmissionFairSharing only) Workloads with lower LocalQueue's usage first 3. Workloads with lower priority first. 4. Workloads admitted more recently first.

func SatisfiesPreemptionPolicy added in v0.15.0

func SatisfiesPreemptionPolicy(preemptor, candidate *kueue.Workload, workloadOrdering workload.Ordering, policy kueue.PreemptionPolicy) bool

Types

type PreemptionPossibility

type PreemptionPossibility int

PreemptionPossibility represents the result of a preemption simulation.

const (
	// NoCandidates were found.
	NoCandidates PreemptionPossibility = iota
	// Preemption targets were found.
	Preempt
	// Preemption targets were found, and
	// all of them are outside of preempting
	// ClusterQueue.
	Reclaim
)

func (PreemptionPossibility) String added in v0.16.0

func (p PreemptionPossibility) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL