mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
migration: Prioritize RDMA in ram_save_target_page()
Address an error in RDMA-based migration by ensuring RDMA is prioritized when saving pages in `ram_save_target_page()`. Previously, the RDMA protocol's page-saving step was placed after other protocols due to a refactoring in commitbc38dc2f5f
. This led to migration failures characterized by unknown control messages and state loading errors destination: (qemu) qemu-system-x86_64: Unknown control message QEMU FILE qemu-system-x86_64: error while loading state section id 1(ram) qemu-system-x86_64: load of migration failed: Operation not permitted source: (qemu) qemu-system-x86_64: RDMA is in an error state waiting migration to abort! qemu-system-x86_64: failed to save SaveStateEntry with id(name): 1(ram): -1 qemu-system-x86_64: rdma migration: recv polling control error! qemu-system-x86_64: warning: Early error. Sending error. qemu-system-x86_64: warning: rdma migration: send polling control error RDMA migration implemented its own protocol/method to send pages to destination side, hand over to RDMA first to prevent pages being saved by other protocol. Fixes:bc38dc2f5f
("migration: refactor ram_save_target_page functions") Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Message-ID: <20250305062825.772629-2-lizhijian@fujitsu.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
094a3dbc55
commit
baa41af1c0
1 changed files with 5 additions and 4 deletions
|
@ -1964,6 +1964,11 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss)
|
|||
ram_addr_t offset = ((ram_addr_t)pss->page) << TARGET_PAGE_BITS;
|
||||
int res;
|
||||
|
||||
/* Hand over to RDMA first */
|
||||
if (control_save_page(pss, offset, &res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if (!migrate_multifd()
|
||||
|| migrate_zero_page_detection() == ZERO_PAGE_DETECTION_LEGACY) {
|
||||
if (save_zero_page(rs, pss, offset)) {
|
||||
|
@ -1976,10 +1981,6 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss)
|
|||
return ram_save_multifd_page(block, offset);
|
||||
}
|
||||
|
||||
if (control_save_page(pss, offset, &res)) {
|
||||
return res;
|
||||
}
|
||||
|
||||
return ram_save_page(rs, pss);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue