numalign

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SysDevicesSystemNodeDir = "devices/system/node"
	SysBusPCIDevicesDir     = "bus/pci/devices/"
)

Variables

This section is empty.

Functions

func GetAllowedCPUList

func GetAllowedCPUList(fs vfs.VFS, statusFile string) ([]int, error)

func GetCPUToNUMANodeMap

func GetCPUToNUMANodeMap(fs vfs.VFS, sysNodeDir string, cpuIDs []int) (map[int]int, error)

func GetCPUsPerNUMANode

func GetCPUsPerNUMANode(fs vfs.VFS, sysfsdir string) (map[int][]int, error)

func GetPCIDeviceNUMANode

func GetPCIDeviceNUMANode(fs vfs.VFS, sysPCIDir string, devs []string) (map[string]int, error)

func GetPCIDeviceToNumaNodeMap

func GetPCIDeviceToNumaNodeMap(fs vfs.VFS, sysBusPCIDir string, pciDevs []string) (map[string]int, error)

func GetPCIDevicesFromEnv

func GetPCIDevicesFromEnv(environ []string) []string

func MakeCPUsToNUMANodeMap

func MakeCPUsToNUMANodeMap(cpusPerNUMA map[int][]int) map[int]int

Types

type Resources

type Resources struct {
	CPUToNUMANode     map[int]int    `json:"cpus"`
	PCIDevsToNUMANode map[string]int `json:"pcidevices"`
}

func NewResources

func NewResources(fs vfs.VFS, procfsRoot, sysfsRoot string, environ, pids []string) (*Resources, error)

func (*Resources) CheckAlignment

func (numaRes *Resources) CheckAlignment() Result

func (*Resources) JSON

func (numaRes *Resources) JSON() string

type Result

type Result struct {
	Aligned    bool       `json:"aligned"`
	NUMACellID int        `json:"numacellid"`
	Resources  *Resources `json:"resources",omitempty`
}

func (Result) JSON

func (re Result) JSON() string

Jump to

Keyboard shortcuts

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