-
Notifications
You must be signed in to change notification settings - Fork 931
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
VM: Instance's CPU auto rebalancing/pinning #13257
VM: Instance's CPU auto rebalancing/pinning #13257
Conversation
26cbf19
to
d6f8d7b
Compare
d6f8d7b
to
968965b
Compare
As usual, I'll prepare tests in lxd-ci repo after this PR is merged |
968965b
to
8248899
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.
Couple of nits, but overall looks great thanks!
0b22377
to
f0e7d1c
Compare
Have updated. Thanks! |
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.
Please can you remove the loggers from SetAffinity and return them as wrapped errors with contextual info added to the error message.
For the affinity set we can passed in, we can include that in the caller's logger context.
f0e7d1c
to
1b48d64
Compare
Thanks! Fixed. I have left logger with with |
Refactor code a bit and make some adjustments in the comments before supporting automatic core pinning support for VM instances as we do for containers instances. Signed-off-by: Alexander Mikhalitsyn <[email protected]>
This VM instance method is used in the dynamic core balancer code. Let's implement it properly. Signed-off-by: Alexander Mikhalitsyn <[email protected]>
…rTrigger Calls to cgroup.TaskSchedulerTrigger can be very costly, let's avoid calling it without real reason. We only have to call it when CPU limits were changed for the instance. Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Put calls to the cgroup.TaskSchedulerTrigger in a few critical places: - on instance start - on instance CPU configuration change - on instance stop Signed-off-by: Alexander Mikhalitsyn <[email protected]>
1b48d64
to
801e031
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.
LGTM!
Test canonical/lxd-ci#132 |
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
canonical/lxd#13257 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Make our pinning balancer aware of VM instances existence.