VULN_CHECK_I913V6 GiVzddlmZddlddlZddlmZddlmZddl Z ddl Z ddl Z ddl Z ddl Z ddl Z ejjZdZGddej$Zy) )hotplug)*N)commandsz$/sys/devices/system/cpu/cpu0/cpuidleceZdZdZfdZdZdZedZdZ dZ dZ d Z d Z d Zd Zd ZdZdZfdZdZdZdZfdZej2ffd ZdZdZdZdZdZd@dZ d@dZ!d@dZ"dZ#dZ$e%d d!"d#Z&e'd d@d$Z(dAd%Z)e%d&d!d'(d)Z*e'd&d@d*Z+d+Z,d,Z-d@d-Z.d.Z/e%d/d!"d0Z0d1Z1d2Z2d3Z3e'd/d@d4Z4d5Z5d6Z6e%d7d!"d8Z7e'd7d@d9Z8e%d:d!"d;Z9e'd:d@d<Z:e%d=d!"d>Z;e'd=d@d?Z<xZ=S)BCPULatencyPlugina Sets the CPU governor to the value specified by the [option]`governor` option and dynamically changes the Power Management Quality of Service (PM QoS) CPU Direct Memory Access (DMA) latency according to the CPU load. `governor`::: The [option]`governor` option of the 'cpu' plug-in supports specifying CPU governors. Multiple governors are separated using '|'. The '|' character is meant to represent a logical 'or' operator. Note that the same syntax is used for the [option]`energy_perf_bias` option. *TuneD* will set the first governor that is available on the system. + .Specifying a CPU governor ==== ---- [cpu] governor=ondemand|powersave ---- *TuneD* will set the 'ondemand' governor, if it is available. If it is not available, but the 'powersave' governor is available, 'powersave' will be set. If neither of them are available, the governor will not be changed. ==== `sampling_down_factor`::: The sampling rate determines how frequently the governor checks to tune the CPU. The [option]`sampling_down_factor` is a tunable that multiplies the sampling rate when the CPU is at its highest clock frequency thereby delaying load evaluation and improving performance. Allowed values for sampling_down_factor are 1 to 100000. + .The recommended setting for jitter reduction ==== ---- [cpu] sampling_down_factor = 100 ---- ==== `energy_perf_bias`::: [option]`energy_perf_bias` supports managing energy vs. performance policy via x86 Model Specific Registers using the `x86_energy_perf_policy` tool. Multiple alternative Energy Performance Bias (EPB) values are supported. The alternative values are separated using the '|' character. The following EPB values are supported starting with kernel 4.13: "performance", "balance-performance", "normal", "balance-power" and "power". On newer processors is value writen straight to file (see rhbz#2095829) + .Specifying alternative Energy Performance Bias values ==== ---- [cpu] energy_perf_bias=powersave|power ---- *TuneD* will try to set EPB to 'powersave'. If that fails, it will try to set it to 'power'. ==== `energy_performance_preference`::: [option]`energy_performance_preference` supports managing energy vs. performance hints on newer Intel and AMD processors with active P-State CPU scaling drivers (intel_pstate or amd-pstate). Multiple alternative Energy Performance Preferences (EPP) values are supported. The alternative values are separated using the '|' character. Available values can be found in `energy_performance_available_preferences` file in `CPUFreq` policy directory in `sysfs`. in + .Specifying alternative Energy Performance Hints values ==== ---- [cpu] energy_performance_preference=balance_power|power ---- *TuneD* will try to set EPP to 'balance_power'. If that fails, it will try to set it to 'power'. ==== `latency_low, latency_high, load_threshold`::: + If the CPU load is lower than the value specified by the [option]`load_threshold` option, the latency is set to the value specified either by the [option]`latency_high` option or by the [option]`latency_low` option. `force_latency`::: You can also force the latency to a specific value and prevent it from dynamically changing further. To do so, set the [option]`force_latency` option to the required latency value. + The maximum latency value can be specified in several ways: + -- * by a numerical value in microseconds (for example, `force_latency=10`) * as the kernel CPU idle level ID of the maximum C-state allowed (for example, force_latency = cstate.id:1) * as a case sensitive name of the maximum C-state allowed (for example, force_latency = cstate.name:C1) * by using 'None' as a fallback value to prevent errors when alternative C-state IDs/names do not exist. When 'None' is used in the alternatives pipeline, all the alternatives that follow 'None' are ignored. -- + It is also possible to specify multiple fallback values separated by '|' as the C-state names and/or IDs may not be available on some systems. + .Specifying fallback C-state values ==== ---- [cpu] force_latency=cstate.name:C6|cstate.id:4|10 ---- This configuration tries to obtain and set the latency of C-state named C6. If the C-state C6 does not exist, kernel CPU idle level ID 4 (state4) latency is searched for in sysfs. Finally, if the state4 directory in sysfs is not found, the last latency fallback value is `10` us. The value is encoded and written into the kernel's PM QoS file `/dev/cpu_dma_latency`. ==== + .Specifying fallback C-state values using 'None'. ==== ---- [cpu] force_latency=cstate.name:XYZ|None ---- In this case, if C-state with the name `XYZ` does not exist, no latency value will be written into the kernel's PM QoS file, and no errors will be reported due to the presence of 'None'. ==== `min_perf_pct, max_perf_pct, no_turbo`::: These options set the internals of the Intel P-State driver exposed via the kernel's `sysfs` interface. + .Adjusting the configuration of the Intel P-State driver ==== ---- [cpu] min_perf_pct=100 ---- Limit the minimum P-State that will be requested by the driver. It states it as a percentage of the max (non-turbo) performance level. ==== `pm_qos_resume_latency_us`::: This option allow to set specific latency for all cpus or specific ones. + .Configuring resume latency ==== ---- [cpu] pm_qos_resume_latency_us=n/a ---- Special value that disables C-states completely. ---- [cpu] pm_qos_resume_latency_us=0 ---- Allows all C-states. ---- [cpu] pm_qos_resume_latency_us=100 ---- Allows any C-state with a resume latency less than 100. ==== `boost`::: The [option]`boost` option allows the CPU to boost above nominal frequencies for shorts periods of time. On Intel systems with the intel_pstate driver, setting boost=0 will automatically set no_turbo=1 to ensure boost is properly disabled. + .Allowing CPU boost ==== ---- [cpu] boost=1 ---- ==== ctt| |i|d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_i|_t#|_d|_y)NTx86_64F)superr__init__ _has_pm_qos_arch_is_x86 _is_intel_is_amd _has_hwp_epp _has_energy_perf_policy_and_bias_has_intel_pstate_has_amd_pstate_has_pm_qos_resume_latency_us_min_perf_pct_save_max_perf_pct_save_no_turbo_save_governors_mapr_cmd_flags)selfargskwargs __class__s =/usr/lib/python3.12/site-packages/tuned/plugins/plugin_cpu.pyr zCPULatencyPlugin.__init__s$($9&9$$*$,$.$,$*/$' $$'+$$ $ $$$j$)$+cd|_t|_|jj dD]'}|jj |j )t|_y)NTcpu)_devices_supportedset _free_devices_hardware_inventory get_devicesaddsys_name_assigned_devicesrdevices r! _init_deviceszCPULatencyPlugin._init_devicessS $u$((44U;f&//*<5$r"c`|Dcgc]}|jjd| c}Scc}w)Nr$)r( get_device)rdevicesxs r!_get_device_objectsz$CPULatencyPlugin._get_device_objectss-AH IA$ " " - -eQ 7 II Is#+c"dddddddddddddd S)Ng?di) load_threshold latency_low latency_high force_latencygovernorsampling_down_factorenergy_perf_bias min_perf_pct max_perf_pctno_turbopm_qos_resume_latency_usenergy_performance_preferenceboostrs r!_get_config_optionsz$CPULatencyPlugin._get_config_optionss5         #%)  r"cngd}tj|_|j|vrntj}|j j d}|dk(rd|_n|dk(s|dk(rd|_nd|_tjd|zn"tjd|jztj|jv|_|jr,|js|j|j!|jr|j#yy) N)r i686i585i486i386 vendor_id GenuineIntelT AuthenticAMD HygonGenuinez$We are running on an x86 %s platformzWe are running on %s (non x86))platformmachinerprocfscpuinfotagsgetrrloginfoconstsCFG_CPU_EPP_FLAG_get_cpuinfo_flagsr"_check_energy_perf_policy_and_bias_check_intel_pstate_check_amd_pstate)r intel_archsr$vendors r! _check_archzCPULatencyPlugin._check_archs<+!$* ZZ;  3 HHLL %6 DN. Fn$<DLDN88 2V ;<88 ,tzz 9:--1H1H1JJ$ ^^   ++- \\r"cd}|jjddgtj|g\}}|dk(r |dk7rd|_y |dkrt j dy t j d y ) z_Check for EPB via x86_energy_perf_policy, warn if the tool is not available or EPB unsupported.rx86_energy_perf_policy-r) no_errorsrTzgunable to run x86_energy_perf_policy tool, ignoring CPU energy performance bias, is the tool installed?zXyour CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance biasN)rexecuteerrnoENOENTrrVwarning)rretcode_unsupportedretcodeouts r!r[z3CPULatencyPlugin._check_energy_perf_policy_and_bias%sp""$>*PQ$ 88 #$r"ctjjd|_|jrtj dyy)Nz"/sys/devices/system/cpu/amd_pstatezamd-pstate detected)rnrorprrVrWrEs r!r]z"CPULatencyPlugin._check_amd_pstate8s3(LM$ 88 !"r"c|j3tjjj dg|_|jS)Nflags)rrRrSrTrUrEs r!rZz#CPULatencyPlugin._get_cpuinfo_flags=s7 [[!&&**7B74; r"ct|}|jjt|jddS)Nr$re)strr is_cpu_onlinereplace)rr.sds r!_is_cpu_onlinezCPULatencyPlugin._is_cpu_onlineBs1 6{"  V!4!4UB!? @@r"cFtjjd|zS)N3/sys/devices/system/cpu/%s/cpufreq/scaling_governor)rnrorpr-s r!_cpu_has_scaling_governorz*CPULatencyPlugin._cpu_has_scaling_governorFs MPVV WWr"c|j|stjd|zy|j|stjd|zyy)Nz'%s' is not online, skippingFz.there is no scaling governor fo '%s', skippingT)ryrVdebugr|r-s r!_check_cpu_can_change_governorz/CPULatencyPlugin._check_cpu_can_change_governorIsK  V $99 +f 45  ' ' /99 = FG  r"cd|_d|_d|_t|jj d|k(r|d|_ tjtjtj|_ d|_|j$d|j$dd|_|j'n)d|_tjd|j(z t|j*d|_y#t$r0tjdtjzd|_YwxYw#t.$r d|_YywxYw)NTFrz-Unable to open '%s', disabling PM_QoS controlr:rAzILatency settings from non-first CPU plugin instance '%s' will be ignored.)_has_static_tuning_has_dynamic_tuning _load_monitorlist _instancesvalues_first_instancernopenrXPATH_CPU_DMA_LATENCYO_WRONLY_cpu_latency_fdOSErrorrVrWr _latencyoptionsr`nameassigned_devices _first_device IndexErrorrinstances r!_instance_initzCPULatencyPlugin._instance_initRs+ $(!&(( $// "#A&(2"8776#>#> LD4='/H4D4DE_4`4h#'H #888 WZbZgZg gh! !:!:;A>8 HH r?r@)r r_instance_apply_staticr _variablesexpandr _set_latencyrrrrrget_boolr)rrforce_latency_value new_valuer s r!rz'CPULatencyPlugin._instance_apply_statics$$6x@  ! ! .. O$&$() %% ^$&9!;;I4%% ^$&9!;;I4yy!!$//"8"8 Z #"#977 4r"c tt| |||jrb|jrU|j d|j |j d|j|j d|jyyy)Nr>r?r@) r r_instance_unapply_staticrrrrrr)rrrollbackr s r!rz)CPULatencyPlugin._instance_unapply_staticsp$88L $"8"8~t/F/FG~t/F/FGz4+>+>?#9r"c(|j||yr)_instance_update_dynamicrrr.s r!_instance_apply_dynamicz(CPULatencyPlugin._instance_apply_dynamics&1r"c||jk7ry|jjd}||jdkr|j |jdy|j |jdy)Nsystemr7r9r8)rrget_loadrr)rrr.rs r!rz)CPULatencyPlugin._instance_update_dynamicsr x%%%    ( ( *8 4$ H  - ..X%%n56X%%m45r"cyrrDrs r!_instance_unapply_dynamicz*CPULatencyPlugin._instance_unapply_dynamicsr"cD t|S#ttf$rYywxYwr)int ValueError TypeErrorrss r!_str2intzCPULatencyPlugin._str2ints' a&= i  s cXi|_tjtD]}td|zz}|jj |dzdd}|jj |dzdd}|T|W|j |}|k||j|j<y)Nz/%s/rTerr_retno_errorlatency)cstates_latencyrnlistdircpuidle_states_pathrrrr)rd cstate_pathrrs r!_read_cstates_latencyz&CPULatencyPlugin._read_cstates_latencys$ ::) *a$vz1; ))  kF2dt  T4 YY y!8DUY Z7 7.mmG$G*1T$**,' +r"cLtjd|z|j%tjd|j|jj |d}|r|dk(rtjdytjdt |z|S)Nz)getting latency for cstate with name '%s'zreading cstates latency tabler"skipping latency 0 as set by paramz!cstate name mapped to latency: %s)rVr~rrrUru)rrno_zerors r!_get_latency_by_cstate_namez,CPULatencyPlugin._get_latency_by_cstate_names)) 7$ >? !99 ,-  $ $T4 0' A99 12 )) /#g, >? .r"ctjdt|z|j|}|tjdytdd|zzz}|j|j j |dd}|r|dk(rtjdytjd t|z|S) Nz'getting latency for cstate with ID '%s'zcstate ID is invalidz /%s/latencyzstate%dTrrrzcstate ID mapped to latency: %s)rVr~rurrrr)rlidr latency_pathrs r!_get_latency_by_cstate_idz*CPULatencyPlugin._get_latency_by_cstate_ids)) 5C @A c#[99 #$ $} C'HH, MM$))--ldW[-\ ]' A99 12 )) -G <= .r"cd|_t|jd}tj d|d|d|D]-} t |}tj d|z|*|dfS|dfS#t $r|dddk(r|j|ddd }n|dd d k(r|j|d d}n|dd dk(r|j|d dd }ny|dddk(r|j|dd}n\|dvrtj dYy|r|dk(rtj dn#tj dt|zd}YwxYw)N|zparsing latency 'z ', allow_na ''z+parsed directly specified latency value: %drzcstate.id_no_zero:T)r z cstate.id:zcstate.name_no_zero: z cstate.name:)noneNonezlatency 'none' specified)NTn/azlatency 'n/a' specifiedzinvalid latency specified: '%s'F) rrusplitrVr~rrrr)rrallow_na latenciess r!_parse_latencyzCPULatencyPlugin._parse_latencysv$'l  %)))Wh GHg'lGII;gEF& %10 %) q},,--gbclD-IW 2, &--gbcl;W 20 0// d/KW 2. (// =W $ $YY)*  g&YY() YY03w<?@W#s#A44BEAEEcT|j|\}}|s|jr|tjdd|_y|j|k7rVtj d|zt jd|}tj|j|||_yyyy)Nztunable to evaluate latency value (probably wrong settings in the 'cpu' section of current profile), disabling PM QoSFzsetting new cpu latency %di) rr rVerrorrrWstructpackrnwriter)rrskip latency_bins r!rzCPULatencyPlugin._set_latencys%%g.-'4 $"" oIIEFD  HH )G 34++c7+KHHT ! !;/DM ! #r"cv|jjd|zjjS)Nz>/sys/devices/system/cpu/%s/cpufreq/scaling_available_governors)rrrrr-s r!_get_available_governorsz)CPULatencyPlugin._get_available_governorss0   ]`ff g m m o u u wwr"r;T) per_devicecr|j|syt|}|jd}|Dcgc]}|j}}|D]'}t |dk(st j dy|j|}|D]{}||vrV|sQt jd|d|d|jjd|z||rtjgndd |S|r`t jd |d|d }t jd dj|zd}|Scc}w)Nrrz.The 'governor' option contains an empty value.zsetting governor ' ' on cpu 'rr{FTrrzIgnoring governor 'z', it is not supportedz.None of the scaling governors is supported: %sz, )rrurrlenrVrrrWrrrgrhr~rijoin)r governorsr.rsimremover;available_governorss r! _set_governorzCPULatencyPlugin._set_governors5 , ,V 4 )n)ooc")09: Hx~~ ):h (mqII>? 55f=h%% XX F YYR u||nEW[]  / II 6;;? yy8 /+;sD4cd}|j|sy|jjd|z|j}t |dkDr|}|t j d|z|S)Nr{rrz*could not get current governor on cpu '%s')rrrrrrVr)rr.rignore_missingr;datas r! _get_governorzCPULatencyPlugin._get_governor/so ( , ,V 4    RU[[ft  u { { }$Y]8 99 9F BC /r"c d|zS)Nz7/sys/devices/system/cpu/cpufreq/%s/sampling_down_factorrD)rr;s r!_sampling_down_factor_pathz+CPULatencyPlugin._sampling_down_factor_path=s BX MMr"r<r)rprioritycd}||jvr|jjd|j|<|j||}|tj d|zy|t |jj vr||j|<|j|}tjj|stj d|d|dyt|}|sMtjd|d|d|jj|||rtj gnd |S) NzIignoring sampling_down_factor setting for CPU '%s', cannot match governorz/ignoring sampling_down_factor setting for CPU 'z ', governor 'z' doesn't support itz!setting sampling_down_factor to 'z' for governor 'rFr)rclearrrVr~rrrrnrorprurWrrrgrh) rr<r.rrrrr;ros r!_set_sampling_down_factorz*CPULatencyPlugin._set_sampling_down_factor@s #  t""" $$f    1( 99 X[a ab  T$--44677!)4v  ) )( 34 ''.. IIhnpxyz  ! "3 HHh WXIID#F5<<.PUV *r"c|j|||}|y|j|}tjj |sy|j j |jS)N)r)rrrnrorprrr)rr.rrr;ros r!_get_sampling_down_factorz*CPULatencyPlugin._get_sampling_down_factor[sc     P(   ( ( 2$      T " ( ( **r"cf|jjdd|t|gd\}}}||fS)Nrb-cT) return_err)rrfru)rcpu_idrrkrlerr_msgs r!_try_set_energy_perf_biasz*CPULatencyPlugin._try_set_energy_perf_biasesH II--&J .7C 7 r"c d|zS)Nz./sys/devices/system/cpu/cpufreq/policy%s/boostrDrrs r!_pstate_boost_pathz#CPULatencyPlugin._pstate_boost_pathns 9F BBr"cd|d|rdSdS)Nz&/sys/devices/system/cpu/cpufreq/policyz/energy_performance_available_preferences preferencerD)rr availables r!_pstate_preference_pathz(CPULatencyPlugin._pstate_preference_pathqs8MSpyUlVL MM@LVL MMr"c d|zS)Nz4/sys/devices/system/cpu/cpu%s/power/energy_perf_biasrDrs r!_energy_perf_bias_pathz'CPULatencyPlugin._energy_perf_bias_pathts ?& HHr"r=cH|j|stjd|zy|jd}|j d}|j r|j |}tjj|r|s|D]l} | j} |jj|| |rtjgnddsFtjd| d|d t#|Stj!d |zt#|Stj!d |zy|j$r|s|D]} | j} tjd | d|d |j'|| \} } | d k(r(tjd| d|d t#|S| d kr$tj!d| zt#|Stjd| d|dtj!d |zt#|Sy)N%s is not online, skippingr$rFTrz&energy_perf_bias successfully set to 'rrzPFailed to set energy_perf_bias on cpu '%s'. Is the value in the profile correct?zXFailed to set energy_perf_bias on cpu '%s' because energy_perf_bias file does not exist.z#Trying to set energy_perf_bias to 'rz"Failed to set energy_perf_bias: %sz#Could not set energy_perf_bias to 'z', trying another value)ryrVr~lstriprrrrnrorprrrrgrhrWrrurr) rr=r.rrrrvalsenergy_perf_bias_pathrrkrs r!_set_energy_perf_biasz&CPULatencyPlugin._set_energy_perf_biasws   V $99 )F 23  == &    $$ 66v>ggnn*+  IIKc  !6$*5<<.4 ! I 6     iib    IIh   ,,  99;SYY v88 sgw1  hh     A+ ii4      ii $ YYa    r"c t|}|S#t$r1} t|d}n#t$r }|}Yd}~nd}~wwxYwYd}~|Sd}~wwxYw)N)rr)rrres r!_try_parse_numzCPULatencyPlugin._try_parse_numsS  1v1 (    Ar A   A (  s.  A  &A ;6A;AA cLddddj|j||S)N performancenormal powersave)rrUr&rs r!_energy_perf_policy_to_humanz-CPULatencyPlugin._energy_perf_policy_to_humans( X+ 6 : :4;N;Nq;QST UUr"cPddddddj|j||S)Nr(zbalance-performancer)z balance-powerpower)rr+r,r-rs r!_energy_perf_policy_to_human_v2z0CPULatencyPlugin._energy_perf_policy_to_human_v2s4     c$  a !$ %r"cd}|j|stjd|zy|jd}|jr\|j |}t jj|r*|j|jj|}|S|jr|jjdd|dg\}}|dk(ro|jD]\} | j} t!| dk(r|j#| d}|St!| d k(sG|j| d}|S|S) Nrr$rbrrcrr)ryrVr~rrrrnrorpr3rrrrf splitlinesrrr.) rr.rrr=rr!rklineslinels r!_get_energy_perf_biasz&CPULatencyPlugin._get_energy_perf_biass=  V $99 )F 23  == & 66v>ggnn*+;;DII7E l  " Q A! ::1Q4@  a&A+==adC # r"c d|zS)Nz9/sys/devices/system/cpu/%s/power/pm_qos_resume_latency_usrDr-s r!_pm_qos_resume_latency_us_pathz/CPULatencyPlugin._pm_qos_resume_latency_us_paths Dv MMr"c|jTtjj|j ||_|jst j d|jS)NzGOption 'pm_qos_resume_latency_us' is not supported on current hardware.)rrnrorpr=rVrWr-s r!_check_pm_qos_resume_latency_usz0CPULatencyPlugin._check_pm_qos_resume_latency_ussQ ''/(*t7Z7Z[a7b(c4%  , ,HH VW + ++r"rAc|j|stjd|zy|j|d\}}|s|j |sy| |dk7r"|dkrtj d|d|dy|s@|j j|j|||rtjgnd |S) NrT)rrrz-Invalid pm_qos_resume_latency_us specified: 'z ', cpu: 'z'.Fr) ryrVr~rr?rirrr=rgrh)rrAr.rrrrrs r!_set_pm_qos_resume_latency_usz.CPULatencyPlugin._set_pm_qos_resume_latency_uss  V $99 )F 23 %%&>%N-'4 55f=  _E)gk;;Qikqrs  994>>vF!' ~U4 .r"c|j|stjd|zy|j|sy|jj |j ||jS)Nrr)ryrVr~r?rrr=r)rr.rrs r!_get_pm_qos_resume_latency_usz.CPULatencyPlugin._get_pm_qos_resume_latency_usse  V $99 )F 23  - -f 5    T@@HSa  b h h jjr"rCcj|j|stjd|zy|jd}d}tj j |j|r|s|dk(s|dk(r`|jj|j|||rtjgnddtjd|d |d d}n.tjd |zntjd |jr@|d vr<|dk(rdnd}|s1 |jd|tjd|d|dd}|s|r t%|S|d vrtj#d|zy#t $r+} tj#dt%| zYd} ~ [d} ~ wwxYw)Nrr$F01TrzSetting boost value ' ' for cpu 'rzEFailed to set boost on cpu '%s'. Is the value in the profile correct?9boost file missing, which can happen on pre 6.11 kernels.)rErFr@zSetting no_turbo to 'z!' for intel_pstate driver (boost=)z+Failed to set no_turbo for intel_pstate: %szaUnable to set boost on cpu '%s'. Neither per-policy boost nor intel_pstate no_turbo is available.)ryrVr~rrnrorprrrrgrhrWrrr Exceptionriru) rrCr.rrrr boost_set no_turbo_valr%s r! _set_boostzCPULatencyPlugin._set_boostsz  V $99 )F 23  == &)WW^^D++F34  |u| YYT44VQGHHIs"0E>> F2!F--F2cp|j|stjd|zy|jd}tj j |j|r8|jj|j|jStjdy)Nrr$rH) ryrVr~rrnrorprrrrrr.rrrs r! _get_boostzCPULatencyPlugin._get_boost*s  V $99 )F 23  == &WW^^D++F34 ))  d55f= > D D FF99 HI r"rBc|j|stjd|zy|jd}tj j |j|dr.|jd}|st|jj|j|dj}|D]} t| } d| cxkxrdknc} t| } | ri|jj|j|| |rt j"gnddtj%d | d |d t|Stj'd | d |d tj)d|zt|Stjdy#t$r| |v} YwxYw)Nrr$TrrFrz-Setting energy_performance_preference value 'rGrz%energy_performance_preference value 'z' unavailable for cpu 'z]Failed to set energy_performance_preference on cpu '%s'. Is the value in the profile correct?yenergy_performance_available_preferences file missing, which can happen if the system is booted without a P-state driver.)ryrVr~rrnrorprrr&rrrrurrrgrhrWrir) rrBr.rrrrr  avail_valsrvalids r!"_set_energy_performance_preferencez3CPULatencyPlugin._set_energy_performance_preference6s  V $99 )F 23  == &WW^^D00>? ' - -c 24 TYY(()E)Efd)STZZ\]J Hc3nne Hc  iid::6BC$*5<<.4I hhRUW]^_ + ,,  kkY\^def YYn  + ,,99IJ   Ze s&F00 G?Gcr|j|stjd|zy|jd}tj j |j|dr8|jj|j|jStjdy)Nrr$TrS) ryrVr~rrnrorprrrrrOs r!"_get_energy_performance_preferencez3CPULatencyPlugin._get_energy_performance_preferenceVs  V $99 )F 23  == &WW^^D00>? ))  d::6B C I I KK99IJ r")F)ondemand)>__name__ __module__ __qualname____doc__r r/r4 classmethodrFr`r[r\r]rZryr|rrrrrrrrrX ROLLBACK_SOFTrrrrrrrrrrr command_setr command_getrrr r rrrrr"r&r.r3r;r=r?rArCrMrPrVrX __classcell__)r s@r!rrsEyv,!J"!F k% #  AX!8=K ]d 0:@9M9M@2 6 2  < xjT*+8j  N$4BG H 4$%+&+CMI T2535n V% !"0N,(T: ; ()k*kg$'%(%Ng  -$?@>-. / r"r)rer decorators tuned.logstunedtuned.utils.commandsr tuned.constsrXrnrgrrPrRlogsrUrVrPluginrrDr"r!rjsN)   jjnn<O w~~O r"