Merge "Disable Max CState limitation"

This commit is contained in:
Zuul
2023-08-25 14:37:36 +00:00
committed by Gerrit Code Review

View File

@@ -11,6 +11,10 @@ class platform::compute::params (
class platform::compute::config
inherits ::platform::compute::params {
include ::platform::collectd::restart
include ::platform::kubernetes::params
$power_management = 'power-management=enabled' in $::platform::kubernetes::params::host_labels
file { '/etc/platform/worker_reserved.conf':
ensure => 'present',
replace => true,
@@ -26,7 +30,7 @@ class platform::compute::config
}
}
if $max_cpu_mhz_configured != undef {
if (!$power_management and $max_cpu_mhz_configured != undef) {
exec { 'Update host max CPU frequency':
command => "/usr/bin/cpupower frequency-set -u ${max_cpu_mhz_configured}MHz",
logoutput => true,
@@ -64,6 +68,7 @@ class platform::compute::grub::params (
'audit_backlog_limit',
'multi-drivers-switch',
'intel_pstate',
'intel_idle.max_cstate',
],
) {
include platform::sysctl::params
@@ -77,13 +82,17 @@ class platform::compute::grub::params (
$skew_tick = ''
}
include ::platform::kubernetes::params
if $::is_broadwell_processor {
$eptad = 'kvm-intel.eptad=0'
} else {
$eptad = ''
}
if $bios_cstate {
$power_management = 'power-management=enabled' in $::platform::kubernetes::params::host_labels
if (!$power_management and $bios_cstate) {
$intel_idle_cstate = 'intel_idle.max_cstate=0'
} else {
$intel_idle_cstate = ''