mbox series

[v4,0/5] migration: Better error handling in rp thread, allow failures in recover

Message ID 20231017202633.296756-1-peterx@redhat.com (mailing list archive)
Headers show
Series migration: Better error handling in rp thread, allow failures in recover | expand

Message

Peter Xu Oct. 17, 2023, 8:26 p.m. UTC
v4:
- Some patches merged, reposting the rest patches
- Fixed a bug in the new test case reported by Fabiano
- Try to keep close_return_path_on_source() return a value (even though it
  still fetches from migrate_has_error)
- Two more patches added to cleanup retval of rp thread functions

v1: https://lore.kernel.org/r/20230829214235.69309-1-peterx@redhat.com
v2: https://lore.kernel.org/r/20230912222145.731099-1-peterx@redhat.com
v3: https://lore.kernel.org/r/20231004220240.167175-1-peterx@redhat.com

This series allow better error handling in the postcopy return path thread,
so that we'll start to store the errors in MigrationState and can be seen
from query-migrate later, comparing to before where we do error_report()
and never remember the error.

Meanwhile, it allows double-failures to happen during postcopy recovery,
IOW, one can fail again right during RECOVER phase on both sides, even if
RECOVER phase should be an extremely small window.

Please have a look, thanks.

Fabiano Rosas (1):
  tests/migration-test: Add a test for postcopy hangs during RECOVER

Peter Xu (4):
  migration: Refactor error handling in source return path
  migration: Allow network to fail even during recovery
  migration: Change ram_dirty_bitmap_reload() retval to bool
  migration: Change ram_save_queue_pages() retval to bool

 migration/migration.h        |   9 +-
 migration/qemu-file.h        |   1 +
 migration/ram.h              |   5 +-
 migration/migration.c        | 190 +++++++++++++++++++++--------------
 migration/qemu-file.c        |   2 +-
 migration/ram.c              |  75 +++++++-------
 tests/qtest/migration-test.c | 102 +++++++++++++++++--
 migration/trace-events       |   4 +-
 8 files changed, 261 insertions(+), 127 deletions(-)