Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly support vm.dirty_(bytes|ratio) and vm.dirty_background_(bytes|ratio) #688

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zacikpa
Copy link
Contributor

@zacikpa zacikpa commented Sep 18, 2024

The options interact within these two pairs: when dirty_bytes is set, dirty_ratio is automatically set to 0 and vice versa. Rollback thus does not work out of the box when setting these options via the sysctl plugin.

This PR adds explicit support for the options into the VM plugin: the new custom commands check whether the value set in the profile is permitted and the rollback is adjusted: the option that was not 0 before the profile switch is reverted.

@jmencak, feel free to test this.

@zacikpa zacikpa requested a review from yarda September 18, 2024 07:46
tuned/plugins/plugin_vm.py Fixed Show fixed Hide fixed
tuned/plugins/plugin_vm.py Fixed Show fixed Hide fixed
tuned/plugins/plugin_vm.py Fixed Show fixed Hide fixed
@jmencak
Copy link
Contributor

jmencak commented Sep 18, 2024

@jmencak, feel free to test this.

Thank you! Planning to take a look today, tomorrow at the latest.

Copy link
Contributor

@jmencak jmencak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR, Pavol. I've tested the code and it resolves https://issues.redhat.com/browse/RHEL-58820. I've also checked the changes in TuneD profiles. They seem fine. Also had a quick look at the code and apart from a minor nit with the style (which is a matter of opinion anyway) it looks fine to me.

tuned/plugins/plugin_vm.py Outdated Show resolved Hide resolved
And for dirty_background_(bytes|ratio).

These parameters interact with each other; it is therefore
not sufficient to configure them via the sysctl plugin.

For more details, see
https://docs.kernel.org/admin-guide/sysctl/vm.html#dirty-bytes.

Resolves: RHEL-58820
@jmencak
Copy link
Contributor

jmencak commented Sep 19, 2024

Thank you for the changes. I believe the whole PR is cleaner this way. I've also retested the scenario in RHEL-58820.
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants