kubernetes: k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology Index | Files

package topology

import "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology"

Package topology contains helpers for the CPU manager.

Index

Package Files

doc.go topology.go

type CPUDetails Uses

type CPUDetails map[int]CPUInfo

CPUDetails is a map from CPU ID to Core ID and Socket ID.

func (CPUDetails) CPUs Uses

func (d CPUDetails) CPUs() cpuset.CPUSet

CPUs returns all of the logical CPU IDs in this CPUDetails.

func (CPUDetails) CPUsInCore Uses

func (d CPUDetails) CPUsInCore(id int) cpuset.CPUSet

CPUsInCore returns all of the logical CPU IDs associated with the given core ID in this CPUDetails.

func (CPUDetails) CPUsInSocket Uses

func (d CPUDetails) CPUsInSocket(id int) cpuset.CPUSet

CPUsInSocket returns all of the logical CPU IDs associated with the given socket ID in this CPUDetails.

func (CPUDetails) Cores Uses

func (d CPUDetails) Cores() cpuset.CPUSet

Cores returns all of the core IDs associated with the CPUs in this CPUDetails.

func (CPUDetails) CoresInSocket Uses

func (d CPUDetails) CoresInSocket(id int) cpuset.CPUSet

CoresInSocket returns all of the core IDs associated with the given socket ID in this CPUDetails.

func (CPUDetails) KeepOnly Uses

func (d CPUDetails) KeepOnly(cpus cpuset.CPUSet) CPUDetails

KeepOnly returns a new CPUDetails object with only the supplied cpus.

func (CPUDetails) Sockets Uses

func (d CPUDetails) Sockets() cpuset.CPUSet

Sockets returns all of the socket IDs associated with the CPUs in this CPUDetails.

type CPUInfo Uses

type CPUInfo struct {
    SocketID int
    CoreID   int
}

CPUInfo contains the socket and core IDs associated with a CPU.

type CPUTopology Uses

type CPUTopology struct {
    NumCPUs    int
    NumCores   int
    NumSockets int
    CPUDetails CPUDetails
}

CPUTopology contains details of node cpu, where : CPU - logical CPU, cadvisor - thread Core - physical CPU, cadvisor - Core Socket - socket, cadvisor - Node

func Discover Uses

func Discover(machineInfo *cadvisorapi.MachineInfo) (*CPUTopology, error)

Discover returns CPUTopology based on cadvisor node info

func (*CPUTopology) CPUsPerCore Uses

func (topo *CPUTopology) CPUsPerCore() int

CPUsPerCore returns the number of logical CPUs are associated with each core.

func (*CPUTopology) CPUsPerSocket Uses

func (topo *CPUTopology) CPUsPerSocket() int

CPUsPerSocket returns the number of logical CPUs are associated with each socket.

Package topology imports 4 packages (graph) and is imported by 28 packages. Updated 2019-04-04. Refresh now. Tools for package owners.