Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stepanblyschak let's add another check here:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
to make sure
performance
is really supported by CPU.If not - log a relevant message and fallback to default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazariig governor is not a cpu feature, governor talks to the scaling driver (cpu specific) to set a target. scaling_available_governors - This list appears to be formed from the global cpufreq_governor_list in the cpufreq driver, where all governors that are included in the kernel are registered.
This cmdline param is fairly new (>5.9) but it is very appealing to use in this case (no need to wait for user space and sysfs to be available to set the governor from user space).
When this won't work - if the next kernel is not built with performance governor as a builtin driver it won't work (governor will not change).
For that, we would have to extract the kernel config from the next image rather then checking current image scaling_available_governors. And I generally don't think we would ever remove features from kernel in next releases.