[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/6] migration/multifd: Unify multifd and TLS connection p
From: |
Peter Xu |
Subject: |
Re: [PATCH v2 5/6] migration/multifd: Unify multifd and TLS connection paths |
Date: |
Tue, 6 Feb 2024 11:33:18 +0800 |
On Mon, Feb 05, 2024 at 04:49:28PM -0300, Fabiano Rosas wrote:
> During multifd channel creation (multifd_send_new_channel_async) when
> TLS is enabled, the multifd_channel_connect function is called twice,
> once to create the TLS handshake thread and another time after the
> asynchrounous TLS handshake has finished.
>
> This creates a slightly confusing call stack where
> multifd_channel_connect() is called more times than the number of
> channels. It also splits error handling between the two callers of
> multifd_channel_connect() causing some code duplication. Lastly, it
> gets in the way of having a single point to determine whether all
> channel creation tasks have been initiated.
>
> Refactor the code to move the reentrancy one level up at the
> multifd_new_send_channel_async() level, de-duplicating the error
> handling and allowing for the next patch to introduce a
> synchronization point common to all the multifd channel creation,
> regardless of TLS.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
[PATCH v2 2/6] migration/multifd: Remove p->running, Fabiano Rosas, 2024/02/05
[PATCH v2 3/6] migration/multifd: Move multifd_send_setup error handling in to the function, Fabiano Rosas, 2024/02/05
[PATCH v2 6/6] migration/multifd: Add a synchronization point for channel creation, Fabiano Rosas, 2024/02/05
Re: [PATCH v2 0/6] migration/multifd: Fix channel creation vs. cleanup races, Peter Xu, 2024/02/05