cache

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// GetByNode returns the last Node Resource Topology info available for a node, adjusted with the assumed
	// resources for that node. Assumed resources are the resources consumed by pods scheduled to that node
	// after the last update of NRT pertaining to the same node, pessimistically overallocated on ALL the NUMA
	// zones of the node.
	// The pod argument is used only for logging purposes.
	GetByNode(nodeName string, pod *corev1.Pod) *topologyv1alpha1.NodeResourceTopology

	// MarkNodeDiscarded declares a node was filtered out for not enough resources available.
	// This means this node is eligible for a resync. When a node is marked discarded (dirty), it matters not
	// if it is so because pessimistic overallocation or because the node truly cannot accomodate the request;
	// this is for the resync step to figure out.
	// The pod argument is used only for logging purposes.
	MarkNodeDiscarded(nodeName string, pod *corev1.Pod)

	// ReserveNodeResources add the resources requested by a pod to the assumed resources for the node on which the pod
	// is scheduled on. This is a prerequesite for the pessimistic overallocation tracking.
	// Additionally, this function resets the discarded counter for the same node. Being able to handle a pod means
	// that this node has still available resources. If a node was previously discarded and then cleared, we interpret
	// this sequence of events as the previous pod required too much - a possible and benign condition.
	ReserveNodeResources(nodeName string, pod *corev1.Pod)

	// UnreserveNodeResources decrement from the node assumed resources the resources required by the given pod.
	UnreserveNodeResources(nodeName string, pod *corev1.Pod)
}

type Passthrough

type Passthrough struct {
	// contains filtered or unexported fields
}

func (Passthrough) GetByNode

func (pt Passthrough) GetByNode(nodeName string, _ *corev1.Pod) *topologyv1alpha1.NodeResourceTopology

func (Passthrough) MarkNodeDiscarded

func (pt Passthrough) MarkNodeDiscarded(nodeName string, pod *corev1.Pod)

func (Passthrough) ReserveNodeResources

func (pt Passthrough) ReserveNodeResources(nodeName string, pod *corev1.Pod)

func (Passthrough) UnreserveNodeResources

func (pt Passthrough) UnreserveNodeResources(nodeName string, pod *corev1.Pod)

Jump to

Keyboard shortcuts

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