Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/performanceprofile/tuned/openshift-node-performance
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ cmdline_pstate=+intel_pstate=passive
{{else if .HardwareTuning}}
cmdline_pstate=+intel_pstate=active
{{else if .RealTimeHint}}
cmdline_pstate=+intel_pstate=disable
cmdline_pstate=+intel_pstate=${f:intel_recommended_pstate}
{{end}}

[rtentsk]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import os
Comment thread
sabbir-47 marked this conversation as resolved.
import tuned.logs
from . import base
from tuned.utils.commands import commands

log = tuned.logs.get()

processor_name = ("sandybridge",
"ivybridge",
"haswell",
"broadwell",
"skylake",
"kabylake",
"cometlake",
"canonlake")

pmu_path = "/sys/devices/cpu/caps/pmu_name"
class intel_recommended_pstate(base.Function):
"""
Checks the processor name and set the pstate
"""
def __init__(self):
# arbitrary number of arguments
super(intel_recommended_pstate, self).__init__("set_pstate_processor", 0)

def execute(self, args):
pstate="disable"
if not super(intel_recommended_pstate, self).execute(args):
return None

current_processor_name = self._cmd.read_file(pmu_path)
if current_processor_name == "" or current_processor_name in processor_name:
return pstate
pstate = "active"
return pstate