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

Fix readahead section value parsing or even better remove this error prone redundant part #709

Open
watologo1 opened this issue Nov 19, 2024 · 0 comments

Comments

@watologo1
Copy link

readahead=4092
readahead=>4092
works just fine as expected.
Things get unnecessary complicated, error prone and buggy when one tries to specify the value in sectors instead of kib:

readahead=4092 s
readahead = 4092 s
-> The sector value is simply divided by 2 and passed the same way as the kib value.
IMO this redundancy is not needed and should not be allowed.
In this case dividing by 2 results in a float type which gets parsed to a string when applied to sysfs and one might get:
2024-11-06 09:52:03,273 ERROR tuned.plugins.base: verify: failed: device md127: 'readahead' = '2048', expected '2048.0'

readahead=>4092 s
Here things seem to break even worse:
2024-11-19 07:51:42,945 WARNING tuned.plugins.base: cannot compare new value '8192 s' with current value '512' by operator '>', using '>8192 s' directly as new value
For the "=>" operator it seems to be a bad idea to pass such non integer or double meaning types.

This part is a bit more abstract and it nicely shows that such (redundant/unnecessary) complexity is a bad idea. People should just use kib?

I can come up with a patch if this is considered the correct approach.

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

No branches or pull requests

1 participant