[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 03/23] migration/multifd: Drop MultiFDSendParams.quit, cle
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH v2 03/23] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths |
Date: |
Fri, 02 Feb 2024 16:15:04 -0300 |
peterx@redhat.com writes:
> From: Peter Xu <peterx@redhat.com>
>
> Multifd send side has two fields to indicate error quits:
>
> - MultiFDSendParams.quit
> - &multifd_send_state->exiting
>
> Merge them into the global one. The replacement is done by changing all
> p->quit checks into the global var check. The global check doesn't need
> any lock.
>
> A few more things done on top of this altogether:
>
> - multifd_send_terminate_threads()
>
> Moving the xchg() of &multifd_send_state->exiting upper, so as to cover
> the tracepoint, migrate_set_error() and migrate_set_state().
>
> - multifd_send_sync_main()
>
> In the 2nd loop, add one more check over the global var to make sure we
> don't keep the looping if QEMU already decided to quit.
>
> - multifd_tls_outgoing_handshake()
>
> Use multifd_send_terminate_threads() to set the error state. That has
> a benefit of updating MigrationState.error to that error too, so we can
> persist that 1st error we hit in that specific channel.
>
> - multifd_new_send_channel_async()
>
> Take similar approach like above, drop the migrate_set_error() because
> multifd_send_terminate_threads() already covers that. Unwrap the helper
> multifd_new_send_channel_cleanup() along the way; not really needed.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
- [PATCH v2 00/23] migration/multifd: Refactor ->send_prepare() and cleanups, peterx, 2024/02/02
- [PATCH v2 01/23] migration/multifd: Drop stale comment for multifd zero copy, peterx, 2024/02/02
- [PATCH v2 02/23] migration/multifd: multifd_send_kick_main(), peterx, 2024/02/02
- [PATCH v2 03/23] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths, peterx, 2024/02/02
- Re: [PATCH v2 03/23] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths,
Fabiano Rosas <=
- [PATCH v2 04/23] migration/multifd: Postpone reset of MultiFDPages_t, peterx, 2024/02/02
- [PATCH v2 05/23] migration/multifd: Drop MultiFDSendParams.normal[] array, peterx, 2024/02/02
[PATCH v2 06/23] migration/multifd: Separate SYNC request with normal jobs, peterx, 2024/02/02
[PATCH v2 07/23] migration/multifd: Simplify locking in sender thread, peterx, 2024/02/02