On 3/15/24 9:29 AM, Pavel Begunkov wrote: > We can run normal task_work without locking the ctx, however we try to > lock anyway and most handlers prefer or require it locked. It might have > been interesting to multi-submitter ring with high contention completing > async read/write requests via task_work, however that will still need to > go through io_req_complete_post() and potentially take the lock for > rsrc node putting or some other case. > > In other words, it's hard to care about it, so alawys force the locking. > The case described would also because of various io_uring caches. This is a good idea, I've had that thought myself too. The conditional aspect of it is annoying, and by far the most interesting use cases will do the locking anyway. -- Jens Axboe