-
Notifications
You must be signed in to change notification settings - Fork 24
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
balloons: set frequency scaling governor only when requested #379
Conversation
055cc18
to
ddab39b
Compare
@klihub I have now removed the leftover loop. |
Two nits, otherwise looks good. |
ddab39b
to
d0ae01d
Compare
5181894
to
3cbc28f
Compare
@klihub addressed the comments. PTAL |
Looking at the governor solution in high level (first implementation and this patch), I'm starting to think that we are adding unnecessary complexity. And I'm slightly worried about it, as we should be adding here other controls as well. If we'd follow the same pattern then, there would be possibly third enforeCpufreqXXX (C-state controls and/or something else) that would needed to be called in the sequence of these two. Currently the two already have different assumption on who is checking if the class exists. Instead of this complexity and introducing new function --- please tell me if I'm mistaken --- we could add only a single if to the original enforeCpufreq() after checking that the class exists. If governor is defined, then set it to the CPUs, and that's it. We would not need to introduce extra function, or have different error paths. What do you think, @fmuyassarov and @klihub , could this be stripped down to single "if", which would make much easier to add new controls in the future in the same two-line manner? |
I think it makes sense. |
Sounds like a really good idea to me. We should consider the governor part of the freq. setting and things get much cleaner. |
Let's refactor this based on the latest suggestion by @askervin.
3cbc28f
to
7d313f8
Compare
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.
In my opinion, we should not introduce a fatal failure due to missing parameters for a CPU class.
+1. Definitely not. |
7d313f8
to
4ad31b3
Compare
Avoid enforcing the frequency scaling governor if the user hasn't explicitly requested it. Previously, we attempted to set it regardless, leading to unnecessary error logs. Furthermore, fix formatting issue when logging error case. Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
4ad31b3
to
249ddcd
Compare
ping @askervin |
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.
LGTM, Thanks @fmuyassarov!
Avoid enforcing the frequency scaling governor if the user hasn't explicitly requested it. Previously, we attempted to set it regardless, leading to unnecessary error logs. Furthermore, fix formatting issue when logging error case.