hostfrequencyscaling

package
v0.0.0-...-8c43e32 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHostfrequencyscaling        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHostfrequencyscaling          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHostfrequencyscaling = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetNodeIPAddress

func GetNodeIPAddress() string

GetNodeIPAddress acquires node IP address

Types

type CPUPerfScalingReq

type CPUPerfScalingReq struct {
	ScalingGovernor  string   `json:"scalinggovernor"`
	ScalingMinFreq   string   `json:"scalingminfreq"`
	ScalingMaxFreq   string   `json:"scalingmaxfreq"`
	NodesAddressList []string `json:"nodesaddresslist,omitempty"`
	Timeout          int      `json:"timeout,omitempty"`
}

CPUPerfScalingReq is payload for RFAggregator API call

type CPUPerfScalingResp

type CPUPerfScalingResp struct {
	TimeStamp          time.Time `json:"timestamp"`
	HostAddress        string    `json:"hostaddress"`
	CurScalingGovernor string    `json:"curscalinggovernor"`
	ScalingMinFreq     string    `json:"scalingminfreq"`
	ScalingMaxFreq     string    `json:"scalingmaxfreq"`
	ScalingCurFreq     string    `json:"scalingcurfreq"`

	CPUCurFreq string `json:"cpucurfreq"`
	CPUMinFreq string `json:"cpuminfreq"`
	CPUMaxFreq string `json:"cpumaxfreq"`
}

CPUPerfScalingResp structure for API response from RFAggregator

type CPUPerfScalingRespColl

type CPUPerfScalingRespColl struct {
	CPUPerfScalingRespCollection []CPUPerfScalingResp `json:"cpuperfscalingrespcollection"`
}

CPUPerfScalingRespColl structure for collection of response

type Config

type Config struct {
	FreqScalPolicies                       map[string]*Policy `` /* 199-byte string literal not displayed */
	FreqSensorUrl                          string             `protobuf:"bytes,2,opt,name=freq_sensor_url,json=freqSensorUrl,proto3" json:"freq_sensor_url,omitempty"`
	ScalingFreqPolicy                      string             `protobuf:"bytes,3,opt,name=scaling_freq_policy,json=scalingFreqPolicy,proto3" json:"scaling_freq_policy,omitempty"`
	LowToHighScaler                        string             `protobuf:"bytes,4,opt,name=low_to_high_scaler,json=lowToHighScaler,proto3" json:"low_to_high_scaler,omitempty"`
	HighToLowScaler                        string             `protobuf:"bytes,5,opt,name=high_to_low_scaler,json=highToLowScaler,proto3" json:"high_to_low_scaler,omitempty"`
	TimeBoundThrottleRetentionDuration     int32              `` /* 170-byte string literal not displayed */
	ThrottleRetention                      bool               `protobuf:"varint,7,opt,name=throttle_retention,json=throttleRetention,proto3" json:"throttle_retention,omitempty"`
	ThermalSensorUrl                       string             `protobuf:"bytes,8,opt,name=thermal_sensor_url,json=thermalSensorUrl,proto3" json:"thermal_sensor_url,omitempty"`
	TimeBoundThrottleRetention             bool               `` /* 144-byte string literal not displayed */
	ThermalBoundThrottleRetention          bool               `` /* 154-byte string literal not displayed */
	ThermalBoundThrottleRetentionThreshold int32              `` /* 183-byte string literal not displayed */
	XXX_NoUnkeyedLiteral                   struct{}           `json:"-"`
	XXX_unrecognized                       []byte             `json:"-"`
	XXX_sizecache                          int32              `json:"-"`
}

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetFreqScalPolicies

func (m *Config) GetFreqScalPolicies() map[string]*Policy

func (*Config) GetFreqSensorUrl

func (m *Config) GetFreqSensorUrl() string

func (*Config) GetHighToLowScaler

func (m *Config) GetHighToLowScaler() string

func (*Config) GetLowToHighScaler

func (m *Config) GetLowToHighScaler() string

func (*Config) GetScalingFreqPolicy

func (m *Config) GetScalingFreqPolicy() string

func (*Config) GetThermalBoundThrottleRetention

func (m *Config) GetThermalBoundThrottleRetention() bool

func (*Config) GetThermalBoundThrottleRetentionThreshold

func (m *Config) GetThermalBoundThrottleRetentionThreshold() int32

func (*Config) GetThermalSensorUrl

func (m *Config) GetThermalSensorUrl() string

func (*Config) GetThrottleRetention

func (m *Config) GetThrottleRetention() bool

func (*Config) GetTimeBoundThrottleRetention

func (m *Config) GetTimeBoundThrottleRetention() bool

func (*Config) GetTimeBoundThrottleRetentionDuration

func (m *Config) GetTimeBoundThrottleRetentionDuration() int32

func (*Config) Marshal

func (m *Config) Marshal() (dAtA []byte, err error)

func (*Config) MarshalTo

func (m *Config) MarshalTo(dAtA []byte) (int, error)

func (*Config) MarshalToSizedBuffer

func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size

func (m *Config) Size() (n int)

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal

func (m *Config) Unmarshal(dAtA []byte) error

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_MessageName

func (*Config) XXX_MessageName() string

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type HFS

type HFS struct {
	// contains filtered or unexported fields
}

HFS provides rfcpufreqscaling module capabilities

func (*HFS) CheckThermalThreshold

func (hfs *HFS) CheckThermalThreshold()

CheckThermalThreshold validates whether current thermal is less than preset threshold and if so set the PS enforcement to false

func (*HFS) ConfigURL

func (*HFS) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*HFS) EnforceTimeBoundScaler

func (hfs *HFS) EnforceTimeBoundScaler()

EnforceTimeBoundScaler keep low frequency scaler like "powersave" for a certain duration

func (*HFS) Entry

func (hfs *HFS) Entry()

Entry is the module's executable entrypoint

func (*HFS) HostFrequencyScaling

func (hfs *HFS) HostFrequencyScaling(node types.Node, freqScalPolicy string)

HostFrequencyScaling scales CPU frequency according to given parameters

func (*HFS) Init

func (hfs *HFS) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*HFS) Name

func (*HFS) Name() string

Name returns the FQDN of the module

func (*HFS) NewConfig

func (*HFS) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*HFS) ReadCPUTemp

func (hfs *HFS) ReadCPUTemp() int32

ReadCPUTemp returns the current CPU thermal

func (*HFS) SetDiscoveryChan

func (hfs *HFS) SetDiscoveryChan(d chan<- types.Event)

SetDiscoveryChan sets the current discovery channel

func (*HFS) SetMutationChan

func (hfs *HFS) SetMutationChan(c <-chan types.Event)

SetMutationChan sets the current mutation channel this is generally done by the API

func (*HFS) Stop

func (hfs *HFS) Stop()

Stop should perform a graceful exit

func (*HFS) UpdateConfig

func (hfs *HFS) UpdateConfig(cfg proto.Message) (e error)

UpdateConfig updates the running config

type Policy

type Policy struct {
	ScalingGovernor      string   `protobuf:"bytes,1,opt,name=scaling_governor,json=scalingGovernor,proto3" json:"scaling_governor,omitempty"`
	ScalingMinFreq       string   `protobuf:"bytes,2,opt,name=scaling_min_freq,json=scalingMinFreq,proto3" json:"scaling_min_freq,omitempty"`
	ScalingMaxFreq       string   `protobuf:"bytes,3,opt,name=scaling_max_freq,json=scalingMaxFreq,proto3" json:"scaling_max_freq,omitempty"`
	NodeArch             string   `protobuf:"bytes,4,opt,name=node_arch,json=nodeArch,proto3" json:"node_arch,omitempty"`
	NodePlatform         string   `protobuf:"bytes,5,opt,name=node_platform,json=nodePlatform,proto3" json:"node_platform,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Policy) Descriptor

func (*Policy) Descriptor() ([]byte, []int)

func (*Policy) GetNodeArch

func (m *Policy) GetNodeArch() string

func (*Policy) GetNodePlatform

func (m *Policy) GetNodePlatform() string

func (*Policy) GetScalingGovernor

func (m *Policy) GetScalingGovernor() string

func (*Policy) GetScalingMaxFreq

func (m *Policy) GetScalingMaxFreq() string

func (*Policy) GetScalingMinFreq

func (m *Policy) GetScalingMinFreq() string

func (*Policy) Marshal

func (m *Policy) Marshal() (dAtA []byte, err error)

func (*Policy) MarshalTo

func (m *Policy) MarshalTo(dAtA []byte) (int, error)

func (*Policy) MarshalToSizedBuffer

func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) Reset

func (m *Policy) Reset()

func (*Policy) Size

func (m *Policy) Size() (n int)

func (*Policy) String

func (m *Policy) String() string

func (*Policy) Unmarshal

func (m *Policy) Unmarshal(dAtA []byte) error

func (*Policy) XXX_DiscardUnknown

func (m *Policy) XXX_DiscardUnknown()

func (*Policy) XXX_Marshal

func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Policy) XXX_Merge

func (m *Policy) XXX_Merge(src proto.Message)

func (*Policy) XXX_MessageName

func (*Policy) XXX_MessageName() string

func (*Policy) XXX_Size

func (m *Policy) XXX_Size() int

func (*Policy) XXX_Unmarshal

func (m *Policy) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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