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:
parent
aa36619baa
commit
db929b878b
1 changed files with 8 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue