mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 17:37:19 +00:00
migration: Postcopy preemption preparation on channel creation
Create a new socket for postcopy to be prepared to send postcopy requested pages via this specific channel, so as to not get blocked by precopy pages. A new thread is also created on dest qemu to receive data from this new channel based on the ram_load_postcopy() routine. The ram_load_postcopy(POSTCOPY) branch and the thread has not started to function, and that'll be done in follow up patches. Cleanup the new sockets on both src/dst QEMUs, meanwhile look after the new thread too to make sure it'll be recycled properly. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20220707185502.27149-1-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> dgilbert: With Peter's fix to quieten compiler warning on start_migration
This commit is contained in:

committed by
Dr. David Alan Gilbert

parent
ce5b0f4afc
commit
36f62f11e4
@ -183,4 +183,14 @@ int postcopy_wake_shared(struct PostCopyFD *pcfd, uint64_t client_addr,
|
||||
int postcopy_request_shared_page(struct PostCopyFD *pcfd, RAMBlock *rb,
|
||||
uint64_t client_addr, uint64_t offset);
|
||||
|
||||
/* Hard-code channels for now for postcopy preemption */
|
||||
enum PostcopyChannels {
|
||||
RAM_CHANNEL_PRECOPY = 0,
|
||||
RAM_CHANNEL_POSTCOPY = 1,
|
||||
RAM_CHANNEL_MAX,
|
||||
};
|
||||
|
||||
bool postcopy_preempt_new_channel(MigrationIncomingState *mis, QEMUFile *file);
|
||||
int postcopy_preempt_setup(MigrationState *s, Error **errp);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user