summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-03-05 20:33:54 +0100
committerGitHub <noreply@github.com>2024-03-05 20:33:54 +0100
commit91a48de5f169519025826bb1783706055fdf5dfd (patch)
tree5bf188b73883621e2dcf92269933ab2f98b59c75
parent51a0d5d9ed3fc2d8f66935cd82fc945b5ff28e51 (diff)
parent3a3e0dff4ff1f80835eca6b2362d792e3ecacc8e (diff)
downloadvyos-1x-91a48de5f169519025826bb1783706055fdf5dfd.tar.gz
vyos-1x-91a48de5f169519025826bb1783706055fdf5dfd.zip
Merge pull request #3093 from c-po/kernel-T2447
T2447: add configurable kernel boot option 'disable-power-saving'
-rw-r--r--interface-definitions/system_option.xml.in6
-rwxr-xr-xsrc/conf_mode/system_option.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/interface-definitions/system_option.xml.in b/interface-definitions/system_option.xml.in
index 602d7d100..fe517d17d 100644
--- a/interface-definitions/system_option.xml.in
+++ b/interface-definitions/system_option.xml.in
@@ -43,6 +43,12 @@
<valueless/>
</properties>
</leafNode>
+ <leafNode name="disable-power-saving">
+ <properties>
+ <help>Disable CPU power saving mechanisms also known as C states</help>
+ <valueless/>
+ </properties>
+ </leafNode>
</children>
</node>
<leafNode name="keyboard-layout">
diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py
index 3b5b67437..7ed451e16 100755
--- a/src/conf_mode/system_option.py
+++ b/src/conf_mode/system_option.py
@@ -92,6 +92,8 @@ def generate(options):
if 'kernel' in options:
if 'disable_mitigations' in options['kernel']:
cmdline_options.append('mitigations=off')
+ if 'disable_power_saving' in options['kernel']:
+ cmdline_options.append('intel_idle.max_cstate=0 processor.max_cstate=1')
grub_util.update_kernel_cmdline_options(' '.join(cmdline_options))
return None