diff --git a/libcontainer/intelrdt/cmt.go b/libcontainer/intelrdt/cmt.go index 6480a1306..56cb956ae 100644 --- a/libcontainer/intelrdt/cmt.go +++ b/libcontainer/intelrdt/cmt.go @@ -2,7 +2,7 @@ package intelrdt var cmtEnabled bool -// Check if Intel RDT/CMT is enabled. +// IsCMTEnabled checks if Intel RDT/CMT is enabled. func IsCMTEnabled() bool { featuresInit() return cmtEnabled diff --git a/libcontainer/intelrdt/intelrdt.go b/libcontainer/intelrdt/intelrdt.go index 97a9fe4d3..7d4b4d38a 100644 --- a/libcontainer/intelrdt/intelrdt.go +++ b/libcontainer/intelrdt/intelrdt.go @@ -416,13 +416,13 @@ func WriteIntelRdtTasks(dir string, pid int) error { return nil } -// Check if Intel RDT/CAT is enabled +// IsCATEnabled checks if Intel RDT/CAT is enabled. func IsCATEnabled() bool { featuresInit() return catEnabled } -// Check if Intel RDT/MBA is enabled +// IsMBAEnabled checks if Intel RDT/MBA is enabled. func IsMBAEnabled() bool { featuresInit() return mbaEnabled @@ -443,7 +443,7 @@ func (m *Manager) getIntelRdtPath() (string, error) { return filepath.Join(rootPath, clos), nil } -// Applies Intel RDT configuration to the process with the specified pid +// Apply applies Intel RDT configuration to the process with the specified pid. func (m *Manager) Apply(pid int) (err error) { // If intelRdt is not specified in config, we do nothing if m.config.IntelRdt == nil { @@ -478,7 +478,7 @@ func (m *Manager) Apply(pid int) (err error) { return nil } -// Destroys the Intel RDT container-specific 'container_id' group +// Destroy destroys the Intel RDT container-specific container_id group. func (m *Manager) Destroy() error { // Don't remove resctrl group if closid has been explicitly specified. The // group is likely externally managed, i.e. by some other entity than us. @@ -494,8 +494,8 @@ func (m *Manager) Destroy() error { return nil } -// Returns Intel RDT path to save in a state file and to be able to -// restore the object later +// GetPath returns Intel RDT path to save in a state file and to be able to +// restore the object later. func (m *Manager) GetPath() string { if m.path == "" { m.path, _ = m.getIntelRdtPath() @@ -503,7 +503,7 @@ func (m *Manager) GetPath() string { return m.path } -// Returns statistics for Intel RDT +// GetStats returns statistics for Intel RDT. func (m *Manager) GetStats() (*Stats, error) { // If intelRdt is not specified in config if m.config.IntelRdt == nil { diff --git a/libcontainer/intelrdt/mbm.go b/libcontainer/intelrdt/mbm.go index 13f31ac7a..669168faf 100644 --- a/libcontainer/intelrdt/mbm.go +++ b/libcontainer/intelrdt/mbm.go @@ -3,7 +3,7 @@ package intelrdt // The flag to indicate if Intel RDT/MBM is enabled var mbmEnabled bool -// Check if Intel RDT/MBM is enabled. +// IsMBMEnabled checks if Intel RDT/MBM is enabled. func IsMBMEnabled() bool { featuresInit() return mbmEnabled