intelrdt

package
v0.0.0-...-e6516b3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IntelRdtTasks = "tasks"
)

Variables

This section is empty.

Functions

func GetIntelRdtPath

func GetIntelRdtPath(id string) (string, error)

Get the 'container_id' path in Intel RDT "resource control" filesystem

func IsEnabled

func IsEnabled() bool

Check if Intel RDT is enabled

func IsNotFound

func IsNotFound(err error) bool

func NewNotFoundError

func NewNotFoundError(res string) error

func WriteIntelRdtTasks

func WriteIntelRdtTasks(dir string, pid int) error

WriteIntelRdtTasks writes the specified pid into the "tasks" file

Types

type IntelRdtManager

type IntelRdtManager struct {
	Config *configs.Config
	Id     string
	Path   string
	// contains filtered or unexported fields
}

This implements interface Manager

func (*IntelRdtManager) Apply

func (m *IntelRdtManager) Apply(pid int) (err error)

Applies Intel RDT configuration to the process with the specified pid

func (*IntelRdtManager) Destroy

func (m *IntelRdtManager) Destroy() error

Destroys the Intel RDT 'container_id' group

func (*IntelRdtManager) GetPath

func (m *IntelRdtManager) GetPath() string

Returns Intel RDT path to save in a state file and to be able to restore the object later

func (*IntelRdtManager) GetStats

func (m *IntelRdtManager) GetStats() (*Stats, error)

Returns statistics for Intel RDT

func (*IntelRdtManager) Set

func (m *IntelRdtManager) Set(container *configs.Config) error

Set Intel RDT "resource control" filesystem as configured.

type L3CacheInfo

type L3CacheInfo struct {
	CbmMask    string `json:"cbm_mask,omitempty"`
	MinCbmBits uint64 `json:"min_cbm_bits,omitempty"`
	NumClosids uint64 `json:"num_closids,omitempty"`
}

type Manager

type Manager interface {
	// Applies Intel RDT configuration to the process with the specified pid
	Apply(pid int) error

	// Returns statistics for Intel RDT
	GetStats() (*Stats, error)

	// Destroys the Intel RDT 'container_id' group
	Destroy() error

	// Returns Intel RDT path to save in a state file and to be able to
	// restore the object later
	GetPath() string

	// Set Intel RDT "resource control" filesystem as configured.
	Set(container *configs.Config) error
}

type NotFoundError

type NotFoundError struct {
	ResourceControl string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type Stats

type Stats struct {
	// The read-only L3 cache information
	L3CacheInfo *L3CacheInfo `json:"l3_cache_info,omitempty"`

	// The read-only L3 cache schema in root
	L3CacheSchemaRoot string `json:"l3_cache_schema_root,omitempty"`

	// The L3 cache schema in 'container_id' group
	L3CacheSchema string `json:"l3_cache_schema,omitempty"`
}

func NewStats

func NewStats() *Stats

Jump to

Keyboard shortcuts

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