Zhimin Feng <[email protected]> wrote:
> From: fengzhimin <[email protected]>
>
> Creation of the RDMA threads, nothing inside yet.
>
> Signed-off-by: fengzhimin <[email protected]>
> ---
> migration/migration.c | 1 +
> migration/migration.h | 2 +
> migration/rdma.c | 283 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 286 insertions(+)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 5756a4806e..f8d4eb657e 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1546,6 +1546,7 @@ static void migrate_fd_cleanup(MigrationState *s)
> qemu_mutex_lock_iothread();
>
> multifd_save_cleanup();
> + multiRDMA_save_cleanup();
Can we merge this with multifd?
> +typedef struct {
> + /* this fields are not changed once the thread is created */
> + /* channel number */
> + uint8_t id;
> + /* channel thread name */
> + char *name;
> + /* channel thread id */
> + QemuThread thread;
> + /* sem where to wait for more work */
> + QemuSemaphore sem;
> + /* this mutex protects the following parameters */
> + QemuMutex mutex;
> + /* is this channel thread running */
> + bool running;
> + /* should this thread finish */
> + bool quit;
> +} MultiRDMASendParams;
This is basically the same than MultiFBSendParams, same for the rest.
I would very much preffer not to have two sets of threads that are
really equivalent.
Thanks, Juan.