Re: [PATCH 3/5] io_uring: consider ring dead once the ref is marked dying

Jens Axboe
2025-04-09T13:15:54Z

On 4/9/25 3:15 AM, Pavel Begunkov wrote:
> On 4/8/25 20:22, Jens Axboe wrote:
>> (getting back to this post the merge window)
>>
>> On 3/21/25 3:22 PM, Pavel Begunkov wrote:
>>> On 3/21/25 19:24, Jens Axboe wrote:
>>>> Don't gate this on the task exiting flag. It's generally not a good idea
>>>
>>> Do you refer to tw add and the PF_EXITING logic inside? We can't gate
>>> it solely on dying refs as it's not sync'ed (and the patch doesn't).
>>> And task is dying is not same as ring is closed. E.g. a task can
>>> exit(2) but leave the ring intact to other tasks.
>>
>> It's not gated solely on dying refs, it's an addition.
>
> Right, which is why the commit message stating "don't gate on the
> task exiting flag" and leaving it gated on the task exiting flag
> is confusing.

Ah yes, the commit message is garbage... I'll send out a new revision.

--
Jens Axboe