-
Notifications
You must be signed in to change notification settings - Fork 2
vmm: live migration asynchronization (dedicated thread) #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
vmm: live migration asynchronization (dedicated thread) #24
Conversation
2c3540c to
349fa34
Compare
cb015f8 to
13117d9
Compare
c18c399 to
c1055f8
Compare
c323c24 to
871a6a1
Compare
7a7e248 to
7d1e566
Compare
18baf46 to
ec84b5d
Compare
ec84b5d to
6eab06b
Compare
olivereanderson
left a comment
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.
This looks quite good,
I mostly have some nits and there are a few comments that I think can be improved.
I am wondering whether a design using the scoped thread API could also work here, but that does not need to be explored now.
6eab06b to
937f880
Compare
937f880 to
17b084e
Compare
|
@olivereanderson since your review, I've simplified Code diff should be visible here: https://github.com/cyberus-technology/cloud-hypervisor/compare/6eab06b350aa0b504874a652735a328e23beaa21..937f8804a84ffb96ca8fcb9c2e8d279dde49933d |
17b084e to
b99f86f
Compare
2aa0c4f to
4a372b4
Compare
4a372b4 to
fb4b932
Compare
scholzp
left a comment
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! Only one thing I have a question about.
fb4b932 to
697649d
Compare
f9db2a3 to
1ae2ba4
Compare
amphi
left a comment
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.
Looks good to me now.
This is a pre-requisite for the following commit which puts the migration into a dedicated thread. It allows the VMM to react to migration events (success/failure). The commit series was inspired by @ljcore [0] but was changed quite significantly. [0] cloud-hypervisor#7038 Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
This puts the send-migration action into a dedicated thread. This means: 1. The send-migration call will exit sooner (just trigger the migration) 2. Other API Call will not be possible as the VM's ownership is transferred from the VMM to the migration thread. E.g., hotplugging won't work (which is good). 3. If the migration causes the VMM process to crash, this currently can't be observed. A mechanism to query the migration status doesn't exist. Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
The commit prepares to properly handle API events during ongoing live-migrations. The VmInfo call is currently not working when a VM is migrating. This will be addressed in a follow-up as part of statistics migration statistics about ongoing live-migrations. Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
Once we have a mechanism to query the progress of an ongoing live-migration, we can remove this workaround. Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
Signed-off-by: Philipp Schuster <[email protected]> On-behalf-of: SAP [email protected]
1ae2ba4 to
86eb8a8
Compare
The PR prepares the live-migration statistics. For that, we need to ensure that
SendMigrationwon't block the whole VMM thread's event loop all the time ("asynchronization").Further, this PR lays the groundwork to prevent VM change events (resize, hotplug) when a migration is ongoing.
Changes
Please review this commit-by-commit.
Closes https://github.com/cobaltcore-dev/cobaltcore/issues/293 and https://github.com/cobaltcore-dev/cobaltcore/issues/230
Steps Before Merge