Skip to content

vmm: Announce the migration memory mode through the protocol - #8819

Open
phip1611 wants to merge 1 commit into
cloud-hypervisor:mainfrom
phip1611:upstream-receive-migration-remove-memory-mode-parameter
Open

vmm: Announce the migration memory mode through the protocol#8819
phip1611 wants to merge 1 commit into
cloud-hypervisor:mainfrom
phip1611:upstream-receive-migration-remove-memory-mode-parameter

Conversation

@phip1611

Copy link
Copy Markdown
Member

IMHO important cleanup/fix of the API. I missed this in @sboeuf PR I think. The new solution is more flexible and easy to integrate.

@phip1611 phip1611 self-assigned this Aug 28, 2026
@phip1611
phip1611 force-pushed the upstream-receive-migration-remove-memory-mode-parameter branch 2 times, most recently from 3ccce95 to e1817db Compare August 28, 2026 17:01
@phip1611
phip1611 marked this pull request as ready for review August 28, 2026 17:29
@phip1611
phip1611 requested a review from a team as a code owner August 28, 2026 17:29
@phip1611
phip1611 requested a review from sboeuf August 28, 2026 17:29
Comment thread vmm/src/api/mod.rs
pub tls_dir: Option<PathBuf>,
/// Memory transfer mode.
#[serde(default)]
pub memory_mode: MigrationMode,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hint for reviewers: technically a breaking change but I tihnk we didn't ship this yet and even if we did, postcopy is officially experimental

Remove memory_mode from VmReceiveMigrationData. The old design is
error-prone and inflexible. Memory migration is entirely sender-driven.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
@phip1611
phip1611 force-pushed the upstream-receive-migration-remove-memory-mode-parameter branch from e1817db to 7adab83 Compare August 28, 2026 18:30

@rbradford rbradford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine. @sboeuf PTAL.. Is there any reason why the receiver needs to know the behaviour before receiving the connection?

let mut migration_config: VmMigrationConfig = serde_json::from_slice(&migration_config_bytes)?;
let state_bytes = fs::read(input_dir.join(SNAPSHOT_STATE_FILE)).map_err(Error::ReadFile)?;

migration_config.set_memory_mode(if ondemand {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing. Why is there a mixture of terminology here. Is ondemand the same as postcopy?

@phip1611 phip1611 Aug 29, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about the offload demon. Please take a look @sboeuf,

@sboeuf

sboeuf commented Aug 28, 2026

Copy link
Copy Markdown
Member

I guess this is fine. @sboeuf PTAL.. Is there any reason why the receiver needs to know the behaviour before receiving the connection?

No I think this approach should be fine as well. As long as we make sure the UFFD ranges are registered soon enough.

@phip1611 I don't have a strong opinion going with either approach but can you please describe in a bit more details what this new approach buys us through the commit message. Also, did you actually run into an issue or this is all theoretical?

This kind of feature has to be driven by some orchestration layer anyway, and having the config being sent from the sender or having the explicit knob on the receiver doesn't make a huge difference IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants