[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontex
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontext locks |
Date: |
Thu, 22 Sep 2022 16:42:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
Am 18/09/2022 um 19:12 schrieb Emanuele Giuseppe Esposito:
>> In replication_stop, we call job_cancel_sync() inside
>> aio_context_acquire - aio_context_release section. Should it be fixed?
> I don't think it breaks anything. The question is: what is the
> aiocontext there protecting? Do we need it? I have no idea.
Ok Paolo reminded me that job_cancel_sync() calls
AIO_WAIT_WHILE_UNLOCKED. This means that it indeed needs to be wrapped
in an aiocontext release() + acquire() block.
>> Another question, sometimes you move job_start out of
>> aio-context-acquire critical section, sometimes not. As I understand,
>> it's of for job_start to be called both with acquired aio-context or not
>> acquired?
>>
> Same as above, job_start does not need the aiocontext to be taken
> (otherwise job_lock would be useless).
I still think here it does not matter if the aiocontext is taken or not.
> Thank you,
> Emanuele