@@ -805,6 +805,22 @@ Optional: You can also use list that will ensure order of items. | |||
power/state: "root:power" | |||
- devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | |||
Sysfs definition with disabled automatic write. Attributes are saved | |||
to configuration, but are not applied during the run. | |||
Thay will be applied automatically after the reboot. | |||
.. code-block:: yaml | |||
linux: | |||
system: | |||
sysfs: | |||
enable_apply: false | |||
scheduler: | |||
block/sda/queue/scheduler: deadline | |||
.. note:: The `enable_apply` parameter defaults to `True` if not defined. | |||
Huge Pages | |||
~~~~~~~~~~~~ | |||
@@ -11,6 +11,8 @@ linux_sysfs_package: | |||
- require: | |||
- pkg: linux_sysfs_package | |||
{% set apply = system.get('sysfs', {}).pop('enable_apply', True) %} | |||
{%- for name, sysfs in system.get('sysfs', {}).items() %} | |||
/etc/sysfs.d/{{ name }}.conf: | |||
@@ -32,6 +34,8 @@ linux_sysfs_package: | |||
{%- set sysfs_list = sysfs %} | |||
{%- endif %} | |||
{%- if apply %} | |||
{%- for item in sysfs_list %} | |||
{%- set list_idx = loop.index %} | |||
{%- for key, value in item.items() %} | |||
@@ -48,4 +52,7 @@ linux_sysfs_write_{{ list_idx }}_{{ name }}_{{ key }}: | |||
{%- endfor %} | |||
{%- endfor %} | |||
{%- endif %} | |||
{%- endfor %} |
@@ -99,6 +99,7 @@ linux: | |||
subjects: | |||
- '@group1' | |||
sysfs: | |||
enable_apply: true | |||
scheduler: | |||
block/sda/queue/scheduler: deadline | |||
power: |