that causes io_ring_exit_work() to wait for it.> It would be great if you or someone else could explain this in detail
and maybe adding some comments into the code.
Almost, the mechanism is absolutely the same as with requests,
and notifiers are actually requests for internal purposes.
In __io_alloc_req_refill() we grab ctx->refs, which are waited
for in io_ring_exit_work(). We usually put requests into a cache,
so when a request is complete we don't put the ref and therefore
in io_ring_exit_work() we also have a call to io_req_caches_free(),
which puts ctx->refs.
Ok, thanks.
Would a close() on the ring fd block? I guess not, but the exit_work may block, correct?
So a process would be a zombie until net released all references?