device

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysfsRoot = "/sys"
)

Variables

This section is empty.

Functions

func FindOrphanedCPUs

func FindOrphanedCPUs(domains []PCIEDomain, allCPUs cpuset.CPUSet) cpuset.CPUSet

func OnlineCPUs

func OnlineCPUs(lh logr.Logger, sysfs fs.ReadLinkFS) (cpuset.CPUSet, error)

func ScanPCIDevices

func ScanPCIDevices(sysfs SysFS, processDevice func(PCIEDevice) error) error

Types

type PCIEDevice

type PCIEDevice struct {
	Address    string
	ClassID    string
	SubclassID string
}

func (PCIEDevice) BaseDirPath

func (pciDev PCIEDevice) BaseDirPath() string

func (PCIEDevice) SysfsPath

func (pciDev PCIEDevice) SysfsPath() string

type PCIEDomain

type PCIEDomain struct {
	PCIERootAttr deviceattribute.DeviceAttribute
	LocalCPUs    cpuset.CPUSet
	NUMANode     int
}

func PCIEDomainsFromFS

func PCIEDomainsFromFS(lh logr.Logger, sysfs SysFS) ([]PCIEDomain, error)

func (PCIEDomain) Loggable added in v0.0.10

func (pcd PCIEDomain) Loggable() []any

func (PCIEDomain) Root

func (pcd PCIEDomain) Root() string

func (PCIEDomain) String

func (pcd PCIEDomain) String() string

type SysFS

type SysFS interface {
	fs.ReadLinkFS
	fs.ReadDirFS
}

Jump to

Keyboard shortcuts

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