Skip to content

Commit

Permalink
libct/intelrdt: delete IsMBAScEnabled()
Browse files Browse the repository at this point in the history
This function is unused, and removing it simplifies the changes which
follow this commit.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 13674f4)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
corhere authored and lifubang committed Aug 10, 2023
1 parent 5ebcfa6 commit 7c83dbe
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions libcontainer/intelrdt/intelrdt.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ var (
catEnabled bool
// The flag to indicate if Intel RDT/MBA is enabled
mbaEnabled bool
// The flag to indicate if Intel RDT/MBA Software Controller is enabled
mbaScEnabled bool

// For Intel RDT initialization
initOnce sync.Once
Expand Down Expand Up @@ -216,12 +214,7 @@ func featuresInit() {
catEnabled = true
}
}
if mbaScEnabled {
// We confirm MBA Software Controller is enabled in step 2,
// MBA should be enabled because MBA Software Controller
// depends on MBA
mbaEnabled = true
} else if flagsSet.MBA {
if flagsSet.MBA {
if _, err := os.Stat(filepath.Join(root, "info", "MB")); err == nil {
mbaEnabled = true
}
Expand Down Expand Up @@ -260,11 +253,6 @@ func findIntelRdtMountpointDir() (string, error) {
return "", errNotFound
}

// Check if MBA Software Controller is enabled through mount option "-o mba_MBps"
if strings.Contains(","+mi[0].VFSOptions+",", ",mba_MBps,") {
mbaScEnabled = true
}

return mi[0].Mountpoint, nil
}

Expand Down Expand Up @@ -493,12 +481,6 @@ func IsMBAEnabled() bool {
return mbaEnabled
}

// Check if Intel RDT/MBA Software Controller is enabled
func IsMBAScEnabled() bool {
featuresInit()
return mbaScEnabled
}

// Get the path of the clos group in "resource control" filesystem that the container belongs to
func (m *Manager) getIntelRdtPath() (string, error) {
rootPath, err := Root()
Expand Down

0 comments on commit 7c83dbe

Please sign in to comment.