Documentation ¶
Index ¶
- Variables
- func DestroyResAssociation(group string) error
- func DisableRdt() bool
- func EnableCat() bool
- func EnableCdp() bool
- func GetNumOfCLOS(getL3Clos, getMbaClos bool) (int, error)
- func GetRdtCosInfo() map[string]*RdtCosInfo
- func GetResAssociation(availableCLOS []string) map[string]*ResAssociation
- func Init() error
- func IsIntelRdtMounted() bool
- func IsNotFound(err error) bool
- func NewNotFoundError(res string) error
- func RemoveTasks(tasks []string) error
- type CPUsTask
- type CacheCos
- type GroupTask
- type MbaCos
- type NotFoundError
- type RdtCosInfo
- type ResAssociation
- type SchemataTask
- type Task
- type TasksTask
Constants ¶
This section is empty.
Variables ¶
var ( // RdtInfo is global immutable variable RdtInfo *map[string]*RdtCosInfo // SysResctrl is the absolute path to the root of the Intel RDT "resource control" filesystem SysResctrl string )
variables that can be accessed from the outside of package
Functions ¶
func DestroyResAssociation ¶
DestroyResAssociation removes resource group
func GetNumOfCLOS ¶
GetNumOfCLOS returns number COSes for L3 Cache, MBA or both depending on input params If both L3 Cache and MBA selected function returns lower of two values
func GetRdtCosInfo ¶
func GetRdtCosInfo() map[string]*RdtCosInfo
GetRdtCosInfo gives RDT info access the resctrl need flock to avoid race with other agent. Go does not support flock lib. That need cgo, please ref: https://gist.github.com/ericchiang/ce0fdcac5659d0a80b38 now we can use lib/flock/flock.go
func GetResAssociation ¶
func GetResAssociation(availableCLOS []string) map[string]*ResAssociation
GetResAssociation returns all resource groups access the resctrl need flock to avoid race with other agent. Go does not support flock lib. That need cgo, please ref: https://gist.github.com/ericchiang/ce0fdcac5659d0a80b38 now we can use lib/flock/flock.go
func IsIntelRdtMounted ¶
func IsIntelRdtMounted() bool
IsIntelRdtMounted give true/false of RDT mounted or not
func NewNotFoundError ¶
NewNotFoundError returns new error of NotFoundError
func RemoveTasks ¶
RemoveTasks move tasks to default resctrl group Resctrl doesn't support remove tasks from sysfs, the way to remove tasks from resource group is to move them to default group
Types ¶
type GroupTask ¶
type GroupTask struct {
Task
}
GroupTask is task to create new group
type NotFoundError ¶
type NotFoundError struct {
ResourceControl string
}
NotFoundError represents not found error
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type RdtCosInfo ¶
RdtCosInfo is from /sys/fs/resctrl/info
type ResAssociation ¶
type ResAssociation struct { Tasks []string CPUs string CacheSchemata map[string][]CacheCos MbaSchemata map[string][]MbaCos }
ResAssociation is the resource group in resctrl TODO need to paser the tag for field setting.
func NewResAssociation ¶
func NewResAssociation() *ResAssociation
NewResAssociation gives new empty ResAssociation
type Task ¶
type Task struct { TaskName string *ResAssociation RessSnapshot map[string]*ResAssociation Group string Path string Revert bool // whether need to Revert after task faild }
Task is task for resctrl