-
Notifications
You must be signed in to change notification settings - Fork 25
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: add support for cpu frequency governor tuning #374
Conversation
This commit introduces a new field in the balloons configuration CR, enabling users to specify CPU frequency governor mode preferences. Signed-off-by: Feruzjon Muyassarov <[email protected]>
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 to me. I skimmed through this once, and if I got the naming wrt. config hierarchy right, this looks fine to me.
My only question is that since ATM we can't test this functionality in our e2e test VMs, have you tested this on real HW in practice ?
Yes, I have tested it on my own machine and it works as expected. Fro example, I was checking the updated governor mode of a core belonging to a balloon by simply |
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. Nice work, @fmuyassarov!
I really wish we had some way to test this in our e2e tests, too. For instance, if we have idleCPUClass defined and no balloons (except for the reserved an possibly the default) to start with, we should have CPUs configured with idle class frequencies and governor. @fmuyassarov, if this runs in a vm, do we get log error messages about failing to set a governor for a CPU? From those errors we could verify that we at least tried to do something sensible. Another reason why this should have an e2e test is that we wish to see what happens when someone uses a balloons configuration with a governor in a vm. After all, it's very much possible that the policy runs in a vm, and might (possibly accidentally) have CPU classes defined, too. |
One possibility is to use similar plumbing than we use for testing controller-agnostic hook triggers in That would require a few changes to the cpu controller when
In the handler for the HTTP endpoint you dump something like this as JSON type state struct {
Classes map[string]Class
Assignments map[string]idset.ID // might be easier to have map[string]string instead
} Then in the tests, we use this endpoint just like we now do for querying metrics, but we fetch data from |
I can verify it. My previous tests were on physical machine. |
As we discussed offline, let's keep it in mind and I will try to allocate some time for setting up something similar that you described here. |
This commit introduces a new field in the balloons configuration CR, enabling users to specify CPU frequency governor mode preferences.