criu: introduce LUO image backend#2947
Draft
Thesola10 wants to merge 1 commit intocheckpoint-restore:criu-devfrom
Draft
criu: introduce LUO image backend#2947Thesola10 wants to merge 1 commit intocheckpoint-restore:criu-devfrom
Thesola10 wants to merge 1 commit intocheckpoint-restore:criu-devfrom
Conversation
This is a simple approach to introduce LUO support into CRIU, by storing our checkpoint images into memfds, and persisting them into a single LUO session. If the session descriptor is created by CRIU, we will halt instead of exiting since session descriptors must remain open when kexec is called in order to be preserved. Signed-off-by: Karim Vergnes <me@thesola.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch adds Live Update Orchestrator as a storage backend for CRIU images.
What this PR does
It adds two flags,
--luo-sessionand--luo-session-fd, which specify a LUO session to save CRIU images into.If CRIU owns the session file descriptor, that is the flag
--luo-sessionis used, CRIU will remain open in order for the session file descriptor to be preserved whenkexecis called.How it works
A new module,
luo.c, has been introduced to manage LUO session file descriptors as a storage medium, by preservingmemfds as is recommended in the kernel documentation.Dump side:
--luo-sessionis specified, a new LUO session is allocated with the name given as argument.memfdis opened and returned as the target file descriptor--luo-sessionis specified, CRIU hangs on a no-op in order to keep the session FD open untilkexecRestore side:
--luo-sessionis specified, CRIU will query/dev/liveupdatefor a session with that name.--luo-sessionis specified, the LUO session is finalized and its resources are freed.Implementation notes
criu/include/linux/liveupdate.h--luo-session-fdis intended for an externally managed file descriptor (ideallysystemd?) and CRIU will not attempt to close or preserve it.TODO:
memfd