[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/6] migration/multifd: Join the TLS thread
From: |
Peter Xu |
Subject: |
Re: [PATCH v2 1/6] migration/multifd: Join the TLS thread |
Date: |
Tue, 6 Feb 2024 17:15:07 +0800 |
On Tue, Feb 06, 2024 at 08:53:45AM +0000, Daniel P. Berrangé wrote:
> AFAICS, it is not ovewriting 'p->thread' because at the time when the
> TLS thread is created, the main 'send thread' has not yet been
> created. The TLS thread and send thread execution times are mutually
> exclusive.
IIUC it'll be overwritten after the tls handshake, where in the tls thread
uses multifd_channel_connect() to create the ultimate multifd thread with
the same p->thread variable:
qemu_thread_create(&p->thread, p->name, multifd_send_thread, p,
QEMU_THREAD_JOINABLE);
There it'll overwrite the old value setup by p->thread, hence the tls
thread resource should be leaked until QEMU quits when created with
JOINABLE in both contexts.
Thanks,
--
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