HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/python3.9/site-packages/tuned/profiles/functions/function_intel_recommended_pstate.py
from . import base

PROCESSOR_NAME = ("sandybridge",
        "ivybridge",
        "haswell",
        "broadwell",
        "skylake")

PMU_PATH = "/sys/devices/cpu/caps/pmu_name"
ACTIVE = "active"
DISABLE = "disable"

class intel_recommended_pstate(base.Function):
    """
    Checks the processor code name and return the recommended
    intel_pstate CPUFreq driver mode. Active is returned for the
    newer generation of processors not in the PROCESSOR_NAME list.

    Intel recommends to use the intel_pstate CPUFreq driver
    in active mode with HWP enabled on Ice Lake and later 
    generations processors. This function allows dynamically 
    setting intel_pstate based on the processor's model.
    For pre-IceLake processors setting pstate to active
    can introduce jitters which were historically seen around
    and tested with RHEL-7.4. From IceLake generation, intel 
    has fixed these issues. 
    """
    def __init__(self):
        super(intel_recommended_pstate, self).__init__("intel_recommended_pstate", 0)

    def execute(self, args):
        if not super(intel_recommended_pstate, self).execute(args):
            return None

        current_processor_name = self._cmd.read_file(PMU_PATH).strip()
        if current_processor_name == "" or current_processor_name in PROCESSOR_NAME:
            return DISABLE
        return ACTIVE