From 7c83dbe6ec2cec36f1962eae9f18b47d79044827 Mon Sep 17 00:00:00 2001 From: Cory Snider Date: Tue, 26 Jul 2022 15:36:47 -0400 Subject: [PATCH] libct/intelrdt: delete IsMBAScEnabled() This function is unused, and removing it simplifies the changes which follow this commit. Signed-off-by: Cory Snider (cherry picked from commit 13674f43d3ff08a6896ecefd1dd201f948cc7e0c) Signed-off-by: Kir Kolyshkin --- libcontainer/intelrdt/intelrdt.go | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/libcontainer/intelrdt/intelrdt.go b/libcontainer/intelrdt/intelrdt.go index 3953f930d..6ea5b2851 100644 --- a/libcontainer/intelrdt/intelrdt.go +++ b/libcontainer/intelrdt/intelrdt.go @@ -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 @@ -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 } @@ -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 } @@ -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()