1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00

Skip pstate detection on Arm

Signed-off-by: Bin Lu <bin.lu@arm.com>
This commit is contained in:
Bin Lu 2018-04-10 14:07:09 +08:00 committed by Markus Lehtonen
parent aa36619baa
commit db929b878b

View file

@ -19,6 +19,7 @@ package pstate
import (
"fmt"
"io/ioutil"
"runtime"
)
// Source implements FeatureSource.
@ -31,6 +32,13 @@ func (s Source) Name() string { return "pstate" }
func (s Source) Discover() ([]string, error) {
features := []string{}
// On Arm platform, the frequency boost mechanism is software-based.
// So skip pstate detection on Arm.
switch runtime.GOARCH {
case "arm64":
return features, nil
}
// Only looking for turbo boost for now...
bytes, err := ioutil.ReadFile("/sys/devices/system/cpu/intel_pstate/no_turbo")
if err != nil {