[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main
|
From: |
Juan Quintela |
|
Subject: |
Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread |
|
Date: |
Thu, 16 Nov 2023 16:51:11 +0100 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) |
Fabiano Rosas <farosas@suse.de> wrote:
> Fabiano Rosas <farosas@suse.de> writes:
>
>> Peter Xu <peterx@redhat.com> writes:
>>
>>> On Thu, Nov 09, 2023 at 01:58:56PM -0300, Fabiano Rosas wrote:
>> I think we historically stumbled upon the fact that qemu_thread_join()
>> is not the same as pthread_join(). The former takes a pointer and is not
>> safe to call with a NULL QemuThread. That seems to be the reason for the
>> p->running check before it.
>
> Scratch this part, the QemuThread is not a pointer.
>
> ...should it be? Because then we can test p->thread instead of
> p->running, which would be more precise and would dispense the
> thread_created flag.
You still need to make sure that you don't join the thread twice.
And we do the qemu_pthread_join() without any lock.
Later, Juan.
[RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread, Fabiano Rosas, 2023/11/09
Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread, Juan Quintela, 2023/11/16
Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread, Juan Quintela, 2023/11/16
Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread, Fabiano Rosas, 2023/11/16